A class that performs sampling from a univariate Normal distribution.
More...
#include <rv_samp.h>
|
| UnivNormSampler () |
| Default-constructor sets up for standard Normal random variate generation.
|
|
| UnivNormSampler (const double &mu, const double &sigma) |
| The user must supply both mean and std. dev. More...
|
|
void | setStdDev (const double &sigma) |
| sets the standard deviation of the sampler. More...
|
|
void | setMean (const double &mu) |
| sets the mean of the sampler. More...
|
|
double | sample () |
| Draws a random number. More...
|
|
| rvsamp_base () |
| The default constructor. This is the only option available. Sets the seed with the clock.
|
|
|
std::normal_distribution | m_z_gen |
| makes normal random variates
|
|
double | m_mu |
| the mean
|
|
double | m_sigma |
| the standard deviation
|
|
|
using | ssv = Eigen::Matrix< double, dim, 1 > |
|
std::mt19937 | m_rng |
| prng
|
|
A class that performs sampling from a univariate Normal distribution.
- Author
- taylor
UnivNormSampler::UnivNormSampler |
( |
const double & |
mu, |
|
|
const double & |
sigma |
|
) |
| |
The user must supply both mean and std. dev.
- Parameters
-
mu | a double for the mean of the sampling distribution. |
sigma | a double (> 0) representing the standard deviation of the samples. |
double UnivNormSampler::sample |
( |
| ) |
|
Draws a random number.
- Returns
- a random sample of type double.
void UnivNormSampler::setMean |
( |
const double & |
mu | ) |
|
sets the mean of the sampler.
- Parameters
-
void UnivNormSampler::setStdDev |
( |
const double & |
sigma | ) |
|
sets the standard deviation of the sampler.
- Parameters
-
sigma | the desired standard deviation. |
The documentation for this class was generated from the following file: