pf
|
A class that performs sampling from a univariate Normal distribution. More...
#include <rv_samp.h>
Public Member Functions | |
UnivNormSampler () | |
Default-constructor sets up for standard Normal random variate generation. | |
UnivNormSampler (float_t mu, float_t sigma) | |
The user must supply both mean and std. dev. More... | |
void | setStdDev (float_t sigma) |
sets the standard deviation of the sampler. More... | |
void | setMean (float_t mu) |
sets the mean of the sampler. 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 | |
Additional Inherited Members | |
![]() | |
std::mt19937 | m_rng |
prng | |
A class that performs sampling from a univariate Normal distribution.
pf::rvsamp::UnivNormSampler< float_t >::UnivNormSampler | ( | float_t | mu, |
float_t | sigma | ||
) |
The user must supply both mean and std. dev.
mu | a float_t for the mean of the sampling distribution. |
sigma | a float_t (> 0) representing the standard deviation of the samples. |
float_t pf::rvsamp::UnivNormSampler< float_t >::sample |
Draws a random number.
void pf::rvsamp::UnivNormSampler< float_t >::setMean | ( | float_t | mu | ) |
sets the mean of the sampler.
mu | the desired mean. |
void pf::rvsamp::UnivNormSampler< float_t >::setStdDev | ( | float_t | sigma | ) |
sets the standard deviation of the sampler.
sigma | the desired standard deviation. |