LogCabin
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Classes | Functions | Variables
LogCabin::Core::Random::anonymous_namespace{Random.cc} Namespace Reference

Classes

class  RandomState
 Keeps state needed by the random number generator, protected by a mutex. More...

Functions

void resetRandomState ()
 Called in child after fork() to reset random seed.
template<typename T >
getRandomBytes ()
 Fill a variable of type T with some random bytes.
double randomUnit ()
 Return a random number between 0 and 1.

Variables

class
LogCabin::Core::Random::anonymous_namespace{Random.cc}::RandomState 
randomState

Function Documentation

void anonymous_namespace Random LogCabin::Core::Random::anonymous_namespace{Random.cc}::LogCabin::Core::Random::cc::resetRandomState ( )

Called in child after fork() to reset random seed.

Definition at line 154 of file Random.cc.

template<typename T >
T LogCabin::Core::Random::anonymous_namespace{Random.cc}::getRandomBytes ( )

Fill a variable of type T with some random bytes.

Definition at line 167 of file Random.cc.

double LogCabin::Core::Random::anonymous_namespace{Random.cc}::randomUnit ( )

Return a random number between 0 and 1.

Definition at line 182 of file Random.cc.


Variable Documentation

class LogCabin::Core::Random::anonymous_namespace{Random.cc}::RandomState LogCabin::Core::Random::anonymous_namespace{Random.cc}::randomState
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines