Celeritas  0.5.0-86+4a8eea4
Public Member Functions | List of all members
celeritas::InverseCdfFinder< G, C > Class Template Reference

Given a sampled CDF value, find the corresponding grid value. More...

#include <InverseCdfFinder.hh>

Public Member Functions

CELER_FUNCTION InverseCdfFinder (G &&grid, C &&calc_cdf)
 Construct from grid and CDF calculator.
 
CELER_FUNCTION real_type operator() (real_type cdf) const
 Find and interpolate the grid value corresponding to the given CDF.
 

Detailed Description

template<class G, class C>
class celeritas::InverseCdfFinder< G, C >

Given a sampled CDF value, find the corresponding grid value.

Template Parameters
GGrid, e.g. UniformGrid or NonUniformGrid
CCalculate the CDF at a given grid index

Both the input grid and the CDF must be monotonically increasing. The sampled CDF value must be in range.


The documentation for this class was generated from the following file: