ESyS-Particle  4.0.1
Public Types | Public Member Functions
esys::lsm::UniformRng< TmplRng > Class Template Reference

#include <Rng.h>

List of all members.

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)

Detailed Description

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

Uniform distribution random number generator.


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.

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.

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