Public Member Functions | Private Attributes | Static Private Attributes | Friends | List of all members
PLMD::Random Class Reference

#include <Random.h>

Public Member Functions

 Random (const std::string &name=noname)
 
void setSeed (int idum)
 
double RandU01 ()
 
double U01 ()
 
double U01d ()
 
int RandInt (int i)
 
void Shuffle (std::vector< unsigned > &vec)
 
void WriteStateFull (std::ostream &) const
 
void ReadStateFull (std::istream &)
 
void fromString (const std::string &str)
 
void toString (std::string &str) const
 
double Gaussian ()
 
void IncreasedPrecis (bool i)
 

Private Attributes

bool incPrec
 
bool switchGaussian
 
double saveGaussian
 
int iy
 
int iv [NTAB]
 
int idum
 
std::string name
 

Static Private Attributes

static const int IA =16807
 
static const int IM =2147483647
 
static const int IQ =127773
 
static const int IR =2836
 
static const int NTAB =32
 
static const int NDIV =(1+(IM-1)/NTAB)
 
static const double EPS =3.0e-16
 
static const double AM =1.0/IM
 
static const double RNMX =(1.0-EPS)
 
static const double fact =5.9604644775390625e-8
 
static const std::string noname ="noname"
 

Friends

std::ostream & operator<< (std::ostream &out, const Random &rng)
 
std::istream & operator>> (std::istream &in, Random &rng)
 

Constructor & Destructor Documentation

◆ Random()

PLMD::Random::Random ( const std::string &  name = noname)
explicit

Member Function Documentation

◆ fromString()

void PLMD::Random::fromString ( const std::string &  str)

◆ Gaussian()

double PLMD::Random::Gaussian ( )

◆ IncreasedPrecis()

void PLMD::Random::IncreasedPrecis ( bool  i)
inline

◆ RandInt()

int PLMD::Random::RandInt ( int  i)

◆ RandU01()

double PLMD::Random::RandU01 ( )

◆ ReadStateFull()

void PLMD::Random::ReadStateFull ( std::istream &  in)

◆ setSeed()

void PLMD::Random::setSeed ( int  idum)

◆ Shuffle()

void PLMD::Random::Shuffle ( std::vector< unsigned > &  vec)

◆ toString()

void PLMD::Random::toString ( std::string &  str) const

◆ U01()

double PLMD::Random::U01 ( )

◆ U01d()

double PLMD::Random::U01d ( )

◆ WriteStateFull()

void PLMD::Random::WriteStateFull ( std::ostream &  out) const

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  out,
const Random rng 
)
friend

◆ operator>>

std::istream& operator>> ( std::istream &  in,
Random rng 
)
friend

Member Data Documentation

◆ AM

const double PLMD::Random::AM =1.0/IM
staticprivate

◆ EPS

const double PLMD::Random::EPS =3.0e-16
staticprivate

◆ fact

const double PLMD::Random::fact =5.9604644775390625e-8
staticprivate

◆ IA

const int PLMD::Random::IA =16807
staticprivate

◆ idum

int PLMD::Random::idum
private

◆ IM

const int PLMD::Random::IM =2147483647
staticprivate

◆ incPrec

bool PLMD::Random::incPrec
private

◆ IQ

const int PLMD::Random::IQ =127773
staticprivate

◆ IR

const int PLMD::Random::IR =2836
staticprivate

◆ iv

int PLMD::Random::iv[NTAB]
private

◆ iy

int PLMD::Random::iy
private

◆ name

std::string PLMD::Random::name
private

◆ NDIV

const int PLMD::Random::NDIV =(1+(IM-1)/NTAB)
staticprivate

◆ noname

const std::string PLMD::Random::noname ="noname"
staticprivate

◆ NTAB

const int PLMD::Random::NTAB =32
staticprivate

◆ RNMX

const double PLMD::Random::RNMX =(1.0-EPS)
staticprivate

◆ saveGaussian

double PLMD::Random::saveGaussian
private

◆ switchGaussian

bool PLMD::Random::switchGaussian
private

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