pf
pf::UniformSampler Class Reference

A class that performs sampling from a continuous uniform distribution. More...

#include <rv_samp.h>

Inheritance diagram for pf::UniformSampler:
Collaboration diagram for pf::UniformSampler:

Public Member Functions

 UniformSampler ()
 The default constructor. Gives a lower bound of 0 and upper bound of 1.
 
 UniformSampler (const double &lower, const double &upper)
 The constructor. More...
 
double sample ()
 Draws a sample. More...
 
- Public Member Functions inherited from pf::rvsamp_base< 1 >
 rvsamp_base ()
 The default constructor. This is the only option available. Sets the seed with the clock.
 

Private Attributes

std::uniform_real_distribution m_unif_gen
 makes uniform random variates
 

Additional Inherited Members

- Public Types inherited from pf::rvsamp_base< 1 >
using ssv = Eigen::Matrix< double, dim, 1 >
 
- Protected Attributes inherited from pf::rvsamp_base< 1 >
std::mt19937 m_rng
 prng
 

Detailed Description

A class that performs sampling from a continuous uniform distribution.

Author
taylor

Constructor & Destructor Documentation

pf::UniformSampler::UniformSampler ( const double &  lower,
const double &  upper 
)

The constructor.

Parameters
lowerthe lower bound of the PRNG.
upperthe upper bound of the PRNG.

Member Function Documentation

double pf::UniformSampler::sample ( )

Draws a sample.

Returns
a sample of type double.

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