pf
|
A class that performs sampling from a truncated univariate Normal distribution. More...
#include <rv_samp.h>
Public Member Functions | |
TruncUnivNormSampler (float_t mu, float_t sigma, float_t lower, float_t upper) | |
The user must supply both mean and std. dev. More... | |
float_t | sample () |
Draws a random number. More... | |
![]() | |
rvsamp_base () | |
The default constructor. This is the only option available. Sets the seed with the clock. | |
Private Attributes | |
std::normal_distribution< float_t > | m_z_gen |
makes normal random variates | |
float_t | m_mu |
the mean | |
float_t | m_sigma |
the standard deviation | |
float_t | m_lower |
the lower bound | |
float_t | m_upper |
the upper bound | |
Additional Inherited Members | |
![]() | |
std::mt19937 | m_rng |
prng | |
A class that performs sampling from a truncated univariate Normal distribution.
pf::rvsamp::TruncUnivNormSampler< float_t >::TruncUnivNormSampler | ( | float_t | mu, |
float_t | sigma, | ||
float_t | lower, | ||
float_t | upper | ||
) |
The user must supply both mean and std. dev.
mu | a float_t for the location parameter. |
sigma | a float_t (> 0) representing the scale of the samples. |
lower | the lower bound of the support |
upper | the upper bound of the support |
float_t pf::rvsamp::TruncUnivNormSampler< float_t >::sample |
Draws a random number.