MTRand Class Reference

Public Types

Public Member Functions

Protected Types

Protected Member Functions

Static Protected Member Functions

Protected Attributes

Friends


Member Typedef Documentation

typedef unsigned long MTRand::uint32

Member Enumeration Documentation

anonymous enum
Enumerator:
N 
anonymous enum
Enumerator:
SAVE 
anonymous enum [protected]
Enumerator:
M 

Constructor & Destructor Documentation

MTRand::MTRand ( const uint32  oneSeed  ) 

References oldm_, and seed().

MTRand::MTRand ( uint32 *const   bigSeed,
uint32 const  seedLength = N 
)

References oldm_, and seed().

MTRand::MTRand (  ) 

References oldm_, and seed().

MTRand::MTRand ( const MTRand o  ) 

References alxm_, g_, left, N, oldm_, pNext, sq_, and state.


Member Function Documentation

MTRand::uint32 MTRand::randInt (  ) 

References left, pNext, and reload().

Referenced by AddCosmics(), rand(), rand53(), randDblExc(), randExc(), and randInt().

MTRand::uint32 MTRand::randInt ( const uint32  n  ) 

References randInt().

double MTRand::rand (  ) 
double MTRand::rand ( const double  n  ) 

References rand().

double MTRand::randExc (  ) 

References randInt().

Referenced by randExc(), and randPoisson().

double MTRand::randExc ( const double  n  ) 

References randExc().

double MTRand::randDblExc (  ) 

References randInt().

Referenced by randDblExc().

double MTRand::randDblExc ( const double  n  ) 

References randDblExc().

double MTRand::operator() (  ) 

References rand().

double MTRand::rand53 (  ) 

References a, b, and randInt().

double MTRand::randNorm ( const double  mean = 0.0,
const double  stddev = 1.0 
)
double MTRand::randPoisson ( const double  mean  ) 

References alxm_, g_, oldm_, randExc(), and sq_.

Referenced by SourceSimulator::AddPoissonNoise(), and main().

void MTRand::seed ( const uint32  oneSeed  ) 

References initialize(), and reload().

Referenced by main().

void MTRand::seed ( uint32 *const   bigSeed,
const uint32  seedLength = N 
)

References initialize(), N, reload(), and state.

void MTRand::seed (  ) 

References hash(), and N.

Referenced by MTRand().

void MTRand::save ( uint32 saveArray  )  const

References left, N, and state.

void MTRand::load ( uint32 *const   loadArray  ) 

References left, N, pNext, and state.

MTRand & MTRand::operator= ( const MTRand o  ) 

References left, N, pNext, and state.

void MTRand::initialize ( const uint32  oneSeed  )  [protected]

References N, and state.

Referenced by seed().

void MTRand::reload (  )  [protected]

References left, M, N, pNext, state, and twist().

Referenced by randInt(), and seed().

uint32 MTRand::hiBit ( const uint32  u  )  const [inline, protected]

Referenced by mixBits().

uint32 MTRand::loBit ( const uint32  u  )  const [inline, protected]

Referenced by magic().

uint32 MTRand::loBits ( const uint32  u  )  const [inline, protected]

Referenced by mixBits().

uint32 MTRand::mixBits ( const uint32  u,
const uint32  v 
) const [inline, protected]

References hiBit(), and loBits().

Referenced by twist().

uint32 MTRand::magic ( const uint32  u  )  const [inline, protected]

References loBit().

Referenced by twist().

uint32 MTRand::twist ( const uint32  m,
const uint32  s0,
const uint32  s1 
) const [inline, protected]

References magic(), and mixBits().

Referenced by reload().

MTRand::uint32 MTRand::hash ( time_t  t,
clock_t  c 
) [static, protected]

Referenced by seed().


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const MTRand mtrand 
) [friend]
std::istream& operator>> ( std::istream &  is,
MTRand mtrand 
) [friend]

Field Documentation

uint32 MTRand::state[N] [protected]
uint32* MTRand::pNext [protected]
int MTRand::left [protected]
double MTRand::sq_ [protected]

Referenced by MTRand(), and randPoisson().

double MTRand::alxm_ [protected]

Referenced by MTRand(), and randPoisson().

double MTRand::g_ [protected]

Referenced by MTRand(), and randPoisson().

double MTRand::oldm_ [protected]

Referenced by MTRand(), and randPoisson().


Generated on 4 Nov 2015 for CURE by  doxygen 1.6.1