Celeritas 0.6.0-13+develop.01c2c09e
|
Calculate the histogram of a set of values. More...
#include <Histogram.hh>
Public Types | |
Type aliases | |
using | Dbl2 = Array< double, 2 > |
using | VecCount = std::vector< size_type > |
using | VecDbl = std::vector< double > |
Public Member Functions | |
Histogram (size_type num_bins, Dbl2 domain) | |
Contruct with the number of bins and domain. | |
void | operator() (double value) |
Update the histogram with a value. | |
void | operator() (VecDbl const &values) |
Update the histogram with a vector of values. | |
VecCount const & | counts () const |
Get the histogram. | |
VecDbl | calc_density () const |
Get the result as a probability desnity. | |
size_type | underflow () const |
Get the number of samples below the lower bound. | |
size_type | overflow () const |
Get the number of samples above the upper bound. | |
double | min () const |
double | max () const |
Calculate the histogram of a set of values.
Values outside of the input domain
are saved to the underflow and overflow bins. All bins are half-open except for the rightmost bin, which will include values equal to the upper domain boundary.
To test that all samples are within the domain: