ESyS-Particle  2.3.2
esys::lsm::UniformRng< TmplRng > Class Template Reference

#include <Rng.h>

Public Types

typedef TmplRng Rng
typedef boost::uniform_real UniformReal
typedef
boost::variate_generator< Rng
&, UniformReal
Generator

Public Member Functions

 UniformRng (double minRn, double maxRn)
double operator() ()
void seed ()
template<typename Tmpl >
void seed (Tmpl &s)
template<typename TmplIt >
void seed (TmplIt begin, TmplIt end)

Private Attributes

Rng m_rng
UniformReal m_uniform
Generator m_generator

Detailed Description

template<typename TmplRng = boost::mt19937>
class esys::lsm::UniformRng< TmplRng >

Uniform distribution random number generator.

Member Typedef Documentation

template<typename TmplRng = boost::mt19937>
typedef boost::variate_generator<Rng &, UniformReal> esys::lsm::UniformRng< TmplRng >::Generator
template<typename TmplRng = boost::mt19937>
typedef TmplRng esys::lsm::UniformRng< TmplRng >::Rng
template<typename TmplRng = boost::mt19937>
typedef boost::uniform_real esys::lsm::UniformRng< TmplRng >::UniformReal

Constructor & Destructor Documentation

template<typename TmplRng >
esys::lsm::UniformRng< TmplRng >::UniformRng ( double  minRn,
double  maxRn 
)

Construct RNG, note that (minRn < maxRn), ie strictly less than.

Parameters
minRnminimum value in uniform dist range.
maxRnmaximum value in uniform dist range.

Member Function Documentation

template<typename TmplRng >
double esys::lsm::UniformRng< TmplRng >::operator() ( )

Generates a random number in this generators range.

template<typename TmplRng >
void esys::lsm::UniformRng< TmplRng >::seed ( )

Seeds the RNG with default seed.

Referenced by esys::lsm::seedDefaultRng().

Here is the caller graph for this function:

template<typename TmplRng >
template<typename Tmpl >
void esys::lsm::UniformRng< TmplRng >::seed ( Tmpl &  s)

Seeds the RNG with specifed seed.

Parameters
sUnsigned int.
template<typename TmplRng >
template<typename TmplIt >
void esys::lsm::UniformRng< TmplRng >::seed ( TmplIt  begin,
TmplIt  end 
)

Seeds the RNG with specifed sequence of values.

Parameters
begin*begin is the first seed-value in sequence.
endSignifies termination of sequence.

Member Data Documentation

template<typename TmplRng = boost::mt19937>
Generator esys::lsm::UniformRng< TmplRng >::m_generator
private
template<typename TmplRng = boost::mt19937>
Rng esys::lsm::UniformRng< TmplRng >::m_rng
private
template<typename TmplRng = boost::mt19937>
UniformReal esys::lsm::UniformRng< TmplRng >::m_uniform
private

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