|
Clipper
|
General histogram class. More...
#include <clipper_stats.h>
Public Member Functions | |
| Histogram () | |
| null constructor | |
| Histogram (const Range< ftype > &range, const int &n) | |
| constructor: from range and sampling | |
| void | accumulate (const ftype &x) |
| add value to histogram (if it is in range) | |
| void | accumulate (const ftype &x, const ftype &w) |
| add specified value to histogram (if it is in range) | |
| ftype | sum () const |
| return sum of whole histogram | |
| const ftype & | y (const int &i) const |
| return value at index in histogram (Note: no bound check on i) | |
| ftype | y (const ftype &x) const |
| return value at interpolated position in histogram | |
| const Histogram & | operator+= (const Histogram &h) |
| add the contents of two histograms (size must match) | |
| ftype | x (const int &i) const |
| return x-value corresponding to centre of i'th range | |
| ftype | x_min (const int &i) const |
| return x-value corresponding to bottom of i'th range | |
| ftype | x_max (const int &i) const |
| return x-value corresponding to top of i'th range | |
| int | size () const |
| return number of samplings in range | |
General histogram class.
This class is used to accumulate and access a histogram of values spread over a specified range. On storing data or retrieving by interpolation the range is checked.
1.7.4