histogram.hpp
Go to the documentation of this file.
void get_range(double range[2]) const
Return data range.
Definition: histogram.cpp:271
uint32_t n(void) const
Return the number of bins along the first axis.
Definition: histogram.hpp:256
const double & operator()(uint32_t i, uint32_t j) const
Return a const reference to the weight on bin (i,j).
Definition: histogram.hpp:332
void get_bin_range(double &min, double &max) const
Return bin range.
Definition: histogram.cpp:185
Histogram1D(uint32_t n, const double range[2])
Constructor for n bin histogram with ranges.
Definition: histogram.cpp:51
const std::vector< double > & get_data(void) const
Return a reference to the histogram data.
Definition: histogram.hpp:328
void convert_to_density(void)
Convert histogram to density.
Definition: histogram.cpp:512
Histogram2D(uint32_t n, uint32_t m, const double range[4])
Constructor for n x m histogram with ranges.
Definition: histogram.cpp:304
void accumulate_linear(double x, double weight=1.0)
Accumulate weight on bins around x linearly.
Definition: histogram.cpp:242
void accumulate_linear(double x, double y, double weight)
Accumulate weight on bins around (x,y) linearly.
Definition: histogram.cpp:558
const Histogram1D & operator*=(double x)
Scale histogram.
Definition: histogram.cpp:287
double icoord(uint32_t i) const
Return the coordinate along the first axis on bin i.
Definition: histogram.cpp:491
uint32_t m(void) const
Return the number of bins along the second axis.
Definition: histogram.hpp:260
void accumulate(uint32_t i)
Accumulate unity weight on bin i.
Definition: histogram.hpp:130
double jcoord(uint32_t j) const
Return the coordinate along the second axis on bin j.
Definition: histogram.cpp:497
void accumulate_closest(double x, double y, double weight)
Accumulate weight to closest bin to (x,y).
Definition: histogram.cpp:547
double coord(uint32_t i) const
Return the coordinate on bin i.
Definition: histogram.cpp:265
double & operator()(uint32_t i, uint32_t j)
Return a reference to the weight on bin (i,j).
Definition: histogram.hpp:338
std::vector< double > & get_data(void)
Return a reference to the histogram data.
Definition: histogram.hpp:322
double & operator()(uint32_t i)
Return a reference to the weight on bin i.
Definition: histogram.hpp:204
const std::vector< double > & get_data(void) const
Return a reference to the histogram data.
Definition: histogram.hpp:194
double mstep(void) const
Return the step size along along the second axis.
Definition: histogram.hpp:268
void accumulate_closest(double x, double weight=1.0)
Accumulate weight to closest bin to x.
Definition: histogram.cpp:199
void get_range(double range[4]) const
Return data range.
Definition: histogram.cpp:503
void get_bin_range(double &min, double &max) const
Return bin range.
Definition: histogram.cpp:532
histogram_accumulation_e
Histogram accumulation type.
Definition: histogram.hpp:53
double nstep(void) const
Return the step size along along the first axis.
Definition: histogram.hpp:264
const double & operator()(uint32_t i) const
Return a const reference to the weight on bin i.
Definition: histogram.hpp:198
void convert_to_density(void)
Convert histogram to density.
Definition: histogram.cpp:278
void accumulate(uint32_t i, double weight)
Accumulate weight on bin i.
Definition: histogram.hpp:122
const Histogram2D & operator*=(double x)
Scale histogram.
Definition: histogram.cpp:521
std::vector< double > & get_data(void)
Return a reference to the histogram data.
Definition: histogram.hpp:190
void accumulate(uint32_t i, uint32_t j, double weight)
Accumulate weight on bin (i,j).
Definition: histogram.hpp:282