|
A library for working with phylogenetic and population genetic data.
v0.32.0
|
|
Go to the documentation of this file. 1 #ifndef GENESIS_UTILS_MATH_HISTOGRAM_H_
2 #define GENESIS_UTILS_MATH_HISTOGRAM_H_
45 bool equal_ranges( Histogram
const& lhs, Histogram
const& rhs );
46 void swap( Histogram& lhs, Histogram& rhs );
82 typedef std::vector<double>::iterator
iterator;
102 const std::vector<double>& ranges
119 void set_ranges(
const std::vector<double>& ranges );
141 double&
at(
size_t bin_num );
143 double at(
size_t bin_num )
const;
171 std::pair<double, double>
bin_range(
size_t bin_num )
const;
175 double bin_width(
size_t bin_num )
const;
203 std::vector<double> bins_;
204 std::vector<double> ranges_;
212 #endif // include guard
double bin_midpoint(size_t bin_num) const
const_iterator cend() const
std::vector< double >::const_iterator const_iterator
bool equal_ranges(Histogram const &lhs, Histogram const &rhs)
OutOfRangeBehaviour out_of_range_behaviour() const
void increment_bin(size_t bin)
bool check_range(double x) const
bool operator==(Histogram const &rhs)
double & operator[](size_t bin_num)
friend bool equal_ranges(Histogram const &lhs, Histogram const &rhs)
double bin_width(size_t bin_num) const
void set_uniform_ranges(const double min, const double max)
void swap(Color &lhs, Color &rhs)
const_iterator cbegin() const
void accumulate_bin(size_t bin, double weight)
std::pair< double, double > bin_range(size_t bin_num) const
Container namespace for all symbols of genesis in order to keep them separate when used as a library.
std::vector< double >::iterator iterator
double & at(size_t bin_num)
long find_bin(double x) const
long accumulate(double x, double weight)
void set_ranges(const std::vector< double > &ranges)
Histogram & operator=(Histogram const &)=default
friend void swap(Histogram &lhs, Histogram &rhs)
Histogram class for accumulating and summarizing data.