#include <Random123/MicroURNG.hpp>
List of all members.
Detailed Description
template<typename CBRNG>
class r123::MicroURNG< CBRNG >
Given a CBRNG whose ctr_type has an unsigned integral value_type, MicroURNG<CBRNG>(c, k) is a type that satisfies the requirements of a C++0x Uniform Random Number Generator.
The intended purpose is for a MicroURNG to be passed as an argument to a C++0x Distribution, e.g., std::normal_distribution. See examples/MicroURNG.cpp.
The MicroURNG functor has a period of "only"
ctr_type.size()*2^32,
after which it will silently repeat.
The high 32 bits of the highest word in the counter c, passed to the constructor must be zero. MicroURNG uses these bits to "count".
Older versions of the library permitted a second template parameter by which the caller could control the number of bits devoted to the URNG's internal counter. This flexibility has been disabled because URNGs created with different numbers of counter bits could, conceivably "collide".
typedef ?someCBRNG? RNG;
RNG::ctr_type c = ...;
RNG::key_type k = ...;
std::normal_distribution<float> nd;
MicroURNG<RNG> urng(c, k);
for(???){
...
nd(urng);
...
}
Member Typedef Documentation
template<typename CBRNG >
template<typename CBRNG >
template<typename CBRNG >
template<typename CBRNG >
template<typename CBRNG >
Constructor & Destructor Documentation
template<typename CBRNG >
template<typename CBRNG >
Member Function Documentation
template<typename CBRNG >
template<typename CBRNG >
template<typename CBRNG >
template<typename CBRNG >
template<typename CBRNG >
Member Data Documentation
template<typename CBRNG >
template<typename CBRNG >
template<typename CBRNG >
The documentation for this class was generated from the following file: