5 #ifndef MECURYDPM_RNG_H
6 #define MECURYDPM_RNG_H
45 void read(std::istream& is);
47 void write(std::ostream& os)
const;
cout<< "The eigenvalues of A are:"<< endl<< ces.eigenvalues()<< endl;cout<< "The matrix of eigenvectors, V, is:"<< endl<< ces.eigenvectors()<< endl<< endl;complex< float > lambda
Definition: ComplexEigenSolver_compute.cpp:9
double Mdouble
Definition: GeneralDefine.h:13
RNGType
Definition: RNG.h:18
@ LAGGED_FIBONACCI_GENERATOR
@ LINEAR_CONGRUENTIAL_GENERATOR
float * p
Definition: Tutorial_Map_using.cpp:9
This is a class that generates random numbers i.e. named the Random Number Generator (RNG).
Definition: RNG.h:32
RNG()
default constructor
Definition: RNG.cc:15
unsigned long int m_
Definition: RNG.h:143
unsigned long int q_
Definition: RNG.h:148
unsigned int getPoissonVariate(Mdouble lambda)
Produces a random number according to a Poisson distribution.
Definition: RNG.cc:192
void read(std::istream &is)
Definition: RNG.cc:38
Mdouble savedBoxMuller_
A storage space for the so-far-unused variate from the pair generated by Box–Muller.
Definition: RNG.h:169
void setRandomSeed(unsigned long int new_seed)
This is the seed for the random number generator (note the call to seed_LFG is only required really i...
Definition: RNG.cc:32
Mdouble getRandomNumberFromLinearCongruentialGenerator(Mdouble min, Mdouble max)
This is a basic Linear Congruential Generator Random.
Definition: RNG.cc:214
unsigned long int randomSeedLinearCongruentialGenerator_
This is the initial seed of the RNG.
Definition: RNG.h:133
void setLinearCongruentialGeneratorParmeters(const unsigned int a, const unsigned int c, unsigned int m)
This functions set the parameters for the LCG random number generator. It goes multiplier,...
Definition: RNG.cc:71
unsigned long int c_
Definition: RNG.h:143
Mdouble test()
This function tests the quality of random numbers, based on the chi-squared test.
Definition: RNG.cc:269
void write(std::ostream &os) const
Definition: RNG.cc:58
RNGType type_
This is the type of random number generator.
Definition: RNG.h:153
unsigned long int a_
This are the two parameters that control the LCG random generated.
Definition: RNG.h:143
bool haveSavedBoxMuller_
A flag that keeps track of whether or not to generate a new pair of normal variates (using Box–Muller...
Definition: RNG.h:164
Mdouble getNormalVariate()
Produces a random number according to a normal distribution with mean 0 and standard deviation 1.
Definition: RNG.cc:144
Mdouble getRandomNumber()
This is a random generating routine can be used for initial positions.
Definition: RNG.cc:123
Mdouble operator()()
Definition: RNG.h:67
void seedLaggedFibonacciGenerator()
This seed the LFG.
Definition: RNG.cc:233
unsigned long int p_
This are the parameters that control the LFG random generator.
Definition: RNG.h:148
void setLaggedFibonacciGeneratorParameters(const unsigned int p, const unsigned int q)
This function sets the parameters for the LFG random number generator.
Definition: RNG.cc:318
Mdouble getRandomNumberFromLaggedFibonacciGenerator(Mdouble min, Mdouble max)
This is a Lagged Fibonacci Generator.
Definition: RNG.cc:245
std::vector< Mdouble > randomSeedLaggedFibonacciGenerator_
This is the seeds required for the LFG.
Definition: RNG.h:138
void randomise()
sets the random variables such that they differ for each run
Definition: RNG.cc:78
Mdouble operator()(Mdouble min, Mdouble max)
Shorthand for getRandomNumber(min, max)
Definition: RNG.h:59
void setRandomNumberGenerator(RNGType type)
Allows the user to set which random number generator is used.
Definition: RNG.cc:118
#define min(a, b)
Definition: datatypes.h:22
#define max(a, b)
Definition: datatypes.h:23
const Scalar * a
Definition: level2_cplx_impl.h:32
int * m
Definition: level2_cplx_impl.h:294
EIGEN_DEVICE_FUNC const Scalar & q
Definition: SpecialFunctionsImpl.h:2019
int c
Definition: calibrate.py:100
type
Definition: compute_granudrum_aor.py:141