105 logger(
INFO,
"First test the gamma function is working\n"
106 "---------------------------------------- \n\n"
107 "Gamma(4) = % : Error %\n"
108 "Gamma(3.5) = % : Error %",
112 logger(
INFO,
"Second test the chi-squared distribution is working\n"
113 "---------------------------------------------------\n\n"
114 "\nFirst test chi(1.07,1) = % Error %\n"
115 "First test chi(1.07,1) = % Error %\n"
116 "First test chi(1.07,1) = % Error %",
127 logger(
INFO,
"\nSecond test the actually random number generate : Linear Congruential Generator\n"
128 "----------------------------------------------\n\n"
129 "First with the default parameters, prob numbers are from uniform = ",
Flusher::NO_FLUSH);
133 logger(
INFO,
"Third test, now with Stefans' the default parameters, prob numbers are from uniform = ",
141 logger(
INFO,
"\nForth test the actually random number generate : Lagged Fibonacci Generator\n"
142 "----------------------------------------------\n"
143 "First with the default parameters, prob numbers are from uniform = ",
Flusher::NO_FLUSH);
LL< Log::INFO > INFO
Info log level.
Definition: Logger.cc:55
Logger< MERCURYDPM_LOGLEVEL > logger("MercuryKernel")
Definition of different loggers with certain modules. A user can define its own custom logger here.
@ LAGGED_FIBONACCI_GENERATOR
@ LINEAR_CONGRUENTIAL_GENERATOR
RNG random
This is a random generator, often used for setting up the initial conditions etc.....
Definition: DPMBase.h:1432
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:53
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:91
Mdouble test()
This function tests the quality of random numbers, based on the chi-squared test.
Definition: RNG.cc:289
void setRandomNumberGenerator(RNGType type)
Allows the user to set which random number generator is used.
Definition: RNG.cc:138
todo{This code is not working as is wanted}
Definition: elastic_gas.cpp:34
void check(double real, double ideal, double error, std::string errorMessage)
Definition: TestHelpers.cc:37
Mdouble gamma(Mdouble gamma_in)
This is the gamma function returns the true value for the half integer value.
Definition: ExtendedMath.cc:137
Mdouble chi_squared_prob(Mdouble x, unsigned int k)
This is the function which actually gives the probability back using a chi squared test.
Definition: ExtendedMath.cc:188
T cubic(const T val)
calculates the cube of a number
Definition: ExtendedMath.h:115