Function opensn::SampleCDF
Defined in File math.h
Function Documentation
-
int opensn::SampleCDF(double x, std::vector<double> cdf_bin)
Sample a Cumulative Distribution Function (CDF) given a probability.
The supplied vector should contain the upper bin boundary for each bin and will return the bin associated with the bin that brackets the supplied probability.