pf
pf::rvsamp::UnivLogNormSampler< float_t > Class Template Reference

A class that performs sampling from a univariate Log-Normal distribution. More...

#include <rv_samp.h>

Inheritance diagram for pf::rvsamp::UnivLogNormSampler< float_t >:
Collaboration diagram for pf::rvsamp::UnivLogNormSampler< float_t >:

Public Member Functions

 UnivLogNormSampler ()
 Default-constructor sets up for standard Normal random variate generation.
 
 UnivLogNormSampler (float_t mu, float_t sigma)
 The user must supply both mu and sigma. More...
 
void setSigma (float_t sigma)
 sets the scale parameter of the logged random variable. More...
 
void setMu (float_t mu)
 sets the location parameter of the logged random variable. More...
 
float_t sample ()
 draws a random number. More...
 
- Public Member Functions inherited from pf::rvsamp::rvsamp_base
 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
 mu
 
float_t m_sigma
 sigma
 

Additional Inherited Members

- Protected Attributes inherited from pf::rvsamp::rvsamp_base
std::mt19937 m_rng
 prng
 

Detailed Description

template<typename float_t>
class pf::rvsamp::UnivLogNormSampler< float_t >

A class that performs sampling from a univariate Log-Normal distribution.

Author
taylor

Constructor & Destructor Documentation

◆ UnivLogNormSampler()

template<typename float_t >
pf::rvsamp::UnivLogNormSampler< float_t >::UnivLogNormSampler ( float_t  mu,
float_t  sigma 
)

The user must supply both mu and sigma.

Parameters
mua location parameter for the logarithm of the sample.
sigmaa positive scale parameter for the logarithm of the sample.

Member Function Documentation

◆ sample()

template<typename float_t >
float_t pf::rvsamp::UnivLogNormSampler< float_t >::sample

draws a random number.

Returns
a random sample of type float_t.

◆ setMu()

template<typename float_t >
void pf::rvsamp::UnivLogNormSampler< float_t >::setMu ( float_t  mu)

sets the location parameter of the logged random variable.

Parameters
muthe desired parameter.

◆ setSigma()

template<typename float_t >
void pf::rvsamp::UnivLogNormSampler< float_t >::setSigma ( float_t  sigma)

sets the scale parameter of the logged random variable.

Parameters
sigmathe desired parameter.

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