pf
|
A class that performs sampling from a Poisson distribution. More...
#include <rv_samp.h>
Public Member Functions | |
PoissonSampler () | |
Default-constructor sets up for Poisson random variate generation with lambda = 1. | |
PoissonSampler (float_t lambda) | |
Constructs Poisson sampler with user-specified lambda. More... | |
void | setLambda (float_t lambda) |
sets the parameter lambda. More... | |
int_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::poisson_distribution< int_t > | m_p_gen |
makes normal random variates | |
Additional Inherited Members | |
![]() | |
std::mt19937 | m_rng |
prng | |
A class that performs sampling from a Poisson distribution.
pf::rvsamp::PoissonSampler< float_t, int_t >::PoissonSampler | ( | float_t | lambda | ) |
Constructs Poisson sampler with user-specified lambda.
lambda | a float_t for the average/variance. |
int_t pf::rvsamp::PoissonSampler< float_t, int_t >::sample |
Draws a random number.
void pf::rvsamp::PoissonSampler< float_t, int_t >::setLambda | ( | float_t | lambda | ) |
sets the parameter lambda.
lambda | (the average and the variance). |