VPTissue Reference Manual

Creates a random generator based on a seed. More...
#include <RandomEngine.h>
Public Member Functions  
RandomEngine ()  
Initializes to default engine( trng::mrg2 with seed 1).  
template<typename D >  
std::function< typename D::result_type()>  GetGenerator (const D &d, int i=0) 
Produce a random generator out of a distribution bound to sim's random engine. More...  
RandomEngineType::Info  GetInfo () const 
Return the state of the random engine.  
bool  Reinitialize () 
Reset to the default engine (trng::mrg2 with seed 1).  
bool  Reinitialize (const boost::property_tree::ptree &ptree) 
Reset to engine defined by the data packed in ptree.  
Creates a random generator based on a seed.
Internally, TRNG is used since: "However, there is a crucial difference between TRNG distributions and C++11 distri butions. TRNG distributions consume exactly one random number from a random number engine to generated a random number from a desired distribution. With C++11 distributions the number of consumed random numbers may be larger or may even vary. Thus, C++11 random number distributions should not be utilized in parallel Monte Carlo simulations. In particular, it is not possible to write parallel Monte Carlo simulations that play fair, see section 2.3."
Definition at line 48 of file RandomEngine.h.

inline 
Produce a random generator out of a distribution bound to sim's random engine.
d  The distribution object. 
i  Which thread is requesting the generator, 0 by default. 
Definition at line 68 of file RandomEngine.h.