All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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 ()
 
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)
 

Detailed Description

Definition at line 31 of file Random.h.

Constructor & Destructor Documentation

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

Definition at line 36 of file Random.cpp.

Member Function Documentation

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

Definition at line 126 of file Random.cpp.

double PLMD::Random::Gaussian ( )

Definition at line 140 of file Random.cpp.

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

Definition at line 63 of file Random.h.

double PLMD::Random::RandU01 ( )

Definition at line 56 of file Random.cpp.

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

Definition at line 109 of file Random.cpp.

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

Definition at line 51 of file Random.cpp.

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

Definition at line 117 of file Random.cpp.

double PLMD::Random::U01 ( )

Definition at line 74 of file Random.cpp.

double PLMD::Random::U01d ( )

Definition at line 65 of file Random.cpp.

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

Definition at line 98 of file Random.cpp.

Friends And Related Function Documentation

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

Definition at line 56 of file Random.h.

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

Definition at line 59 of file Random.h.

Member Data Documentation

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

Definition at line 35 of file Random.h.

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

Definition at line 34 of file Random.h.

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

Definition at line 37 of file Random.h.

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

Definition at line 32 of file Random.h.

int PLMD::Random::idum
private

Definition at line 44 of file Random.h.

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

Definition at line 32 of file Random.h.

bool PLMD::Random::incPrec
private

Definition at line 39 of file Random.h.

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

Definition at line 32 of file Random.h.

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

Definition at line 32 of file Random.h.

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

Definition at line 43 of file Random.h.

int PLMD::Random::iy
private

Definition at line 42 of file Random.h.

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

Definition at line 45 of file Random.h.

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

Definition at line 33 of file Random.h.

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

Definition at line 38 of file Random.h.

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

Definition at line 32 of file Random.h.

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

Definition at line 36 of file Random.h.

double PLMD::Random::saveGaussian
private

Definition at line 41 of file Random.h.

bool PLMD::Random::switchGaussian
private

Definition at line 40 of file Random.h.


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