revision: v0.14
RNG Class Reference

This is a class that generates random numbers i.e. named the Random Number Generator (RNG). More...

#include <RNG.h>

Public Member Functions

 RNG ()
 default constructor More...
 
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 if using that type of generator, but the other one is always required) More...
 
void read (std::istream &is)
 
void write (std::ostream &os) const
 
Mdouble getRandomNumber ()
 This is a random generating routine can be used for initial positions. More...
 
Mdouble getRandomNumber (Mdouble min, Mdouble max)
 
Mdouble operator() (Mdouble min, Mdouble max)
 Shorthand for getRandomNumber(min, max) More...
 
Mdouble operator() ()
 
Mdouble getNormalVariate ()
 Produces a random number according to a normal distribution with mean 0 and standard deviation 1. More...
 
Mdouble getNormalVariate (Mdouble mean, Mdouble stdev)
 Produces a random number according to a normal distribution. More...
 
unsigned int getPoissonVariate (Mdouble lambda)
 Produces a random number according to a Poisson distribution. More...
 
Mdouble test ()
 This function tests the quality of random numbers, based on the chi-squared test. More...
 
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, addition, mod. More...
 
void randomise ()
 sets the random variables such that they differ for each run More...
 
void setLaggedFibonacciGeneratorParameters (const unsigned int p, const unsigned int q)
 This function sets the parameters for the LFG random number generator. More...
 
void setRandomNumberGenerator (RNGType type)
 Allows the user to set which random number generator is used. More...
 

Private Member Functions

Mdouble getRandomNumberFromLinearCongruentialGenerator (Mdouble min, Mdouble max)
 This is a basic Linear Congruential Generator Random. More...
 
Mdouble getRandomNumberFromLaggedFibonacciGenerator (Mdouble min, Mdouble max)
 This is a Lagged Fibonacci Generator. More...
 
void seedLaggedFibonacciGenerator ()
 This seed the LFG. More...
 

Private Attributes

unsigned long int randomSeedLinearCongruentialGenerator_
 This is the initial seed of the RNG. More...
 
std::vector< MdoublerandomSeedLaggedFibonacciGenerator_
 This is the seeds required for the LFG. More...
 
unsigned long int a_
 This are the two parameters that control the LCG random generated. More...
 
unsigned long int c_
 
unsigned long int m_
 
unsigned long int p_
 This are the parameters that control the LFG random generator. More...
 
unsigned long int q_
 
RNGType type_
 This is the type of random number generator. More...
 
bool haveSavedBoxMuller_
 A flag that keeps track of whether or not to generate a new pair of normal variates (using Box–Muller) More...
 
Mdouble savedBoxMuller_
 A storage space for the so-far-unused variate from the pair generated by Box–Muller. More...
 

Detailed Description

This is a class that generates random numbers i.e. named the Random Number Generator (RNG).

This is a stand-along class; but is encapsulated (used) by the MD class. To make it architecture safe the both LCG and function is hard codes i.e. does not use the internal C++ one.

Todo:
(AT) implement new C++-standard RNG instead of this one (Kudos on the hard work done here though ;). NB: maybe something for Mercury 2?

Constructor & Destructor Documentation

◆ RNG()

RNG::RNG ( )

default constructor

This is a random number generator and returns a Mdouble within the range specified

Todo:
36 {
38  a_ = 1103515245;
39  c_ = 12345;
40  m_ = 1024 * 1024 * 1024;
41  type_ = RNGType::LAGGED_FIBONACCI_GENERATOR;
42  p_ = 607;
43  q_ = 273;
46 
47  haveSavedBoxMuller_ = false;
48  savedBoxMuller_ = 0;
49 
50 }

References a_, c_, haveSavedBoxMuller_, m_, p_, q_, randomSeedLaggedFibonacciGenerator_, randomSeedLinearCongruentialGenerator_, savedBoxMuller_, seedLaggedFibonacciGenerator(), and type_.

Member Function Documentation

◆ getNormalVariate() [1/2]

Mdouble RNG::getNormalVariate ( )

Produces a random number according to a normal distribution with mean 0 and standard deviation 1.

164 {
165  static const double epsilon = std::numeric_limits<Mdouble>::min();
166 
168  {
169  /* If we have already generated a normal variate, use it. */
170  haveSavedBoxMuller_ = false;
171  return savedBoxMuller_;
172  }
173  else
174  {
175  /* Otherwise, generate a pair of normal variates, return one of them,
176  * and save the other. */
177  Mdouble radius, theta;
178  do
179  {
180  radius = getRandomNumber(0, 1);
181  theta = getRandomNumber(0, 2 * constants::pi);
182  } while (radius <= epsilon);
183  // make sure that the radius generated is not too small
184  // (unlikely to happen, just a safety check)
185 
186  savedBoxMuller_ = sqrt(-2.0 * log(radius)) * sin(theta);
187  haveSavedBoxMuller_ = true;
188  return sqrt(-2.0 * log(radius)) * cos(theta);
189  }
190 }

References mathsFunc::cos(), getRandomNumber(), haveSavedBoxMuller_, mathsFunc::log(), constants::pi, savedBoxMuller_, and mathsFunc::sin().

Referenced by getNormalVariate().

◆ getNormalVariate() [2/2]

Mdouble RNG::getNormalVariate ( Mdouble  mean,
Mdouble  stdev 
)

Produces a random number according to a normal distribution.

193 {
194  if (stdev == 0) {
195  logger(WARN,
196  "[RNG::getNormalVariate(Mdouble, Mdouble)] Zero stdev?");
197  return mean;
198  } else if (stdev < 0) {
199  logger(ERROR,
200  "[RNG::getNormalVariate(Mdouble, Mdouble)] Negative stdev is not allowed.");
201  } else {
202  return getNormalVariate() * stdev + mean;
203  }
204 }

References ERROR, getNormalVariate(), logger, and WARN.

◆ getPoissonVariate()

unsigned int RNG::getPoissonVariate ( Mdouble  lambda)

Produces a random number according to a Poisson distribution.

This uses Knuth's algorithm for generating Poisson variates. It's simple but slow for large values of lambda — beware.

211 {
212  if (lambda > 50)
213  {
214  logger(WARN, "[RNG::getPoissonVariate(Mdouble)] Knuth's algorithm for Poissons may be slow for lambda = %", lambda);
215  }
216  unsigned int k = 0;
217  Mdouble p = 1;
218  Mdouble u;
219  do
220  {
221  k++;
222  u = getRandomNumber(0, 1);
223  p *= u;
224  }
225  while (u > exp(-lambda));
226  return k-1;
227 }

References mathsFunc::exp(), getRandomNumber(), logger, and WARN.

Referenced by CurvyChute::createBottom().

◆ getRandomNumber() [1/2]

Mdouble RNG::getRandomNumber ( )

This is a random generating routine can be used for initial positions.

143 {
144  return getRandomNumber(0, 1);
145 }

Referenced by SmoothChute::actionsBeforeTimeStep(), Chutebelt::actionsOnRestart(), NautaMixer::addParticles(), HeaterBoundary::checkBoundaryAfterParticleMoved(), BaseCluster::computeInternalStructure(), LawinenBox::create_inflow_particle(), ChutePeriodic::create_inflow_particle(), ChuteWithContraction::create_inflow_particle(), Funnel::create_inflow_particle(), AngleOfRepose::create_inflow_particle(), FlowRule::create_inflow_particle(), SilbertPeriodic::create_inflow_particle(), SegregationWithHopper::create_inflow_particle(), Slide::create_rough_wall(), Chute::createBottom(), CurvyChute::createBottom(), Chute::createFlowParticle(), InsertionBoundary::generateParticle(), BidisperseCubeInsertionBoundary::generateParticle(), PolydisperseInsertionBoundary::generateParticle(), getNormalVariate(), getPoissonVariate(), InitialConditions< SpeciesType >::InitialConditions(), HorizontalMixer::introduceParticlesInDomain(), main(), operator()(), BaseCluster::particleInsertionSuccessful(), particleParticleTest(), FixedClusterInsertionBoundary::placeParticle(), ChuteInsertionBoundary::placeParticle(), CubeInsertionBoundary::placeParticle(), HopperInsertionBoundary::placeParticle(), PolydisperseInsertionBoundary::placeParticle(), RandomClusterInsertionBoundary::placeParticle(), MD_demo::RandomRadius(), DPMBase::setMeanVelocityAndKineticEnergy(), BaseCluster::setRadii(), ClosedCSCWalls::setupInitialConditions(), CSCInit::setupInitialConditions(), CSCWalls::setupInitialConditions(), TimeDependentPeriodicBoundary3DSelfTest::setupInitialConditions(), Cstatic2d::setupInitialConditions(), MercuryLogo::setupInitialConditions(), SmoothChute::setupInitialConditions(), NozzleDemo::setupInitialConditions(), Binary::setupInitialConditions(), FreeCooling2DinWallsDemo::setupInitialConditions(), FreeCooling3DDemoProblem::setupInitialConditions(), FreeCooling3DinWallsDemo::setupInitialConditions(), FreeCoolingDemoProblem::setupInitialConditions(), HourGlass2D::setupInitialConditions(), HourGlass::setupInitialConditions(), MinimalExampleDrum::setupInitialConditions(), FiveParticles::setupInitialConditions(), LeesEdwardsSelfTest::setupInitialConditions(), NozzleSelfTest::setupInitialConditions(), ParticleCreation::setupInitialConditions(), ParticleParticleCollision::setupInitialConditions(), WallParticleCollision::setupInitialConditions(), my_problem_HGRID::setupInitialConditions(), TriangulatedScrewSelfTest::setupInitialConditions(), TriangulatedWallSelfTest::setupInitialConditions(), DrumRot::setupInitialConditions(), RotatingDrum::setupInitialConditions(), ScalingTestInitialConditionsRelax::setupInitialConditions(), GranularCollapse::setupInitialConditions(), EllipticalSuperQuadricCollision::setupInitialConditions(), Tutorial11::setupInitialConditions(), MD_demo::setupInitialConditions(), MpiMaserChuteTest::setupInitialConditions(), MpiPeriodicBoundaryUnitTest::setupInitialConditions(), ChuteBottom::setupInitialConditions(), test(), and wallParticleTest().

◆ getRandomNumber() [2/2]

Mdouble RNG::getRandomNumber ( Mdouble  min,
Mdouble  max 
)
148 {
149  logger.assert_debug(min <= max, "getRandomNumber: min cannot be larger than max");
152  } else {
154  }
155 }

References getRandomNumberFromLaggedFibonacciGenerator(), getRandomNumberFromLinearCongruentialGenerator(), LAGGED_FIBONACCI_GENERATOR, logger, and type_.

◆ getRandomNumberFromLaggedFibonacciGenerator()

Mdouble RNG::getRandomNumberFromLaggedFibonacciGenerator ( Mdouble  min,
Mdouble  max 
)
private

This is a Lagged Fibonacci Generator.

This is a basic Linear Fibonacci Generator Random Is described by three parameters, the multiplication a, the addition c and the mod m

266 {
267 #pragma optimize( "", off )
269  static_cast<Mdouble>(1.0));
270  //Update the random seed
272  randomSeedLaggedFibonacciGenerator_.emplace_back(new_seed);
273 
274  //Generate a random number in the required range
275 
276  Mdouble random_num;
277 
278  Mdouble range = max - min;
279  random_num = min + range * new_seed;
280  return random_num;
281 #pragma optimize( "", on )
282 }

References p_, q_, and randomSeedLaggedFibonacciGenerator_.

Referenced by getRandomNumber().

◆ getRandomNumberFromLinearCongruentialGenerator()

Mdouble RNG::getRandomNumberFromLinearCongruentialGenerator ( Mdouble  min,
Mdouble  max 
)
private

This is a basic Linear Congruential Generator Random.

This is a basic Linear Congruential Generator Random Is described by three parameters, the multiplication a, the addition c and the mod m

235 {
236  //Update the random seed
238 
239  //Generate a random number in the required range
240 
241  Mdouble range = max - min;
242  Mdouble random_num = min + range * randomSeedLinearCongruentialGenerator_ / (static_cast<Mdouble>(m_) + 1.0);
243 
244  return random_num;
245 }

References a_, c_, m_, and randomSeedLinearCongruentialGenerator_.

Referenced by getRandomNumber(), and seedLaggedFibonacciGenerator().

◆ operator()() [1/2]

Mdouble RNG::operator() ( )
inline
89  {
90  return getRandomNumber(0.0, 1.0);
91  }

References getRandomNumber().

◆ operator()() [2/2]

Mdouble RNG::operator() ( Mdouble  min,
Mdouble  max 
)
inline

Shorthand for getRandomNumber(min, max)

81  {
82  return getRandomNumber(min, max);
83  }

References getRandomNumber().

◆ randomise()

void RNG::randomise ( )

sets the random variables such that they differ for each run

98 {
99 #ifdef MERCURY_USE_MPI
100  //First set a random seed on the root
101  if (PROCESSOR_ID == 0)
102  {
103  setRandomSeed(static_cast<unsigned long int>(time(nullptr)));
104  }
105 
106  //Communicate this to the rest of the processes
107  std::vector<int> values(7);
108  if (PROCESSOR_ID == 0)
109  {
110  values[0] = static_cast<unsigned int>(type_);
111  values[1] = a_;
112  values[2] = c_;
113  values[3] = m_;
114  values[4] = p_;
115  values[5] = q_;
117  }
118  MPIContainer::Instance().broadcast(values.data(),7,0);
119 
120  //Update the generators on the other processors
121  if (PROCESSOR_ID != 0)
122  {
123  type_ = static_cast<RNGType>(values[0]);
124  a_ = values[1];
125  c_ = values[2];
126  m_ = values[3];
127  p_ = values[4];
128  q_ = values[5];
130  }
132 #else
133  setRandomSeed(static_cast<unsigned long int>(time(nullptr)));
134 #endif
135 }

References a_, MPIContainer::broadcast(), c_, MPIContainer::Instance(), m_, p_, PROCESSOR_ID, q_, randomSeedLinearCongruentialGenerator_, seedLaggedFibonacciGenerator(), setRandomSeed(), and type_.

Referenced by FixedClusterInsertionBoundary::checkBoundaryBeforeTimeStep(), RandomClusterInsertionBoundary::checkBoundaryBeforeTimeStep(), LawinenBox::LawinenBox(), main(), FixedClusterInsertionBoundary::placeParticle(), RandomClusterInsertionBoundary::placeParticle(), and DPMBase::readNextArgument().

◆ read()

void RNG::read ( std::istream &  is)
59 {
60  std::string dummy;
61  unsigned int type;
62  is >> type;
63  type_ = static_cast<RNGType>(type);
64  is >> a_;
65  is >> c_;
66  is >> m_;
67  is >> p_;
68  is >> q_;
70  //note: the seeds for the LaggedFibonacciGenerator cannot be restarted currently.
72  //randomSeedLaggedFibonacciGenerator_.resize(p_);
73  //for (auto& v : randomSeedLaggedFibonacciGenerator_)
74  // is >> v;
75 }

References a_, c_, m_, p_, q_, randomSeedLinearCongruentialGenerator_, seedLaggedFibonacciGenerator(), and type_.

Referenced by DPMBase::read().

◆ seedLaggedFibonacciGenerator()

void RNG::seedLaggedFibonacciGenerator ( )
private

◆ setLaggedFibonacciGeneratorParameters()

void RNG::setLaggedFibonacciGeneratorParameters ( const unsigned int  p,
const unsigned int  q 
)

This function sets the parameters for the LFG random number generator.

339 {
340  //p must be greater than q so makes sure this is true. Not sure what happens if you set p=q, in the LFG alogrithm.
341  if (p < q)
342  {
343  p_ = q;
344  q_ = p;
345  }
346 
349 }

References p_, q_, randomSeedLaggedFibonacciGenerator_, and seedLaggedFibonacciGenerator().

◆ setLinearCongruentialGeneratorParmeters()

void RNG::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, addition, mod.

91 {
92  a_ = a;
93  c_ = c;
94  m_ = m;
95 }

References a_, c_, and m_.

Referenced by main().

◆ setRandomNumberGenerator()

void RNG::setRandomNumberGenerator ( RNGType  type)

Allows the user to set which random number generator is used.

138 {
139  type_ = type;
140 }

References type_.

Referenced by main().

◆ setRandomSeed()

void RNG::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 if using that type of generator, but the other one is always required)

References randomSeedLinearCongruentialGenerator_, and seedLaggedFibonacciGenerator().

Referenced by DPMBase::constructor(), main(), particleParticleTest(), and randomise().

◆ test()

Mdouble RNG::test ( )

This function tests the quality of random numbers, based on the chi-squared test.

This function tests the quality of random numbers, based on the chi-squared test. It reports a probability that the random number being generated are coming from a uniform distributed. If this number is less than 0.95, it is strongly advised that you change the parameters being used

290 {
291  //This are the fixed parameters that define the test
292  static unsigned int num_of_tests = 100000;
293  static Mdouble max_num = 100.0;
294  static unsigned int num_of_bins = 10;
295 
296  //This is the generated random_number
297  Mdouble rn;
298  //This is the bin the random number will lie in
299  unsigned int bin = 0;
300  //This is a vector of bins
301  std::vector<int> count;
302  count.resize(num_of_bins);
303 
304  //Initialisation of the bins
305  for (unsigned int i = 0; i < num_of_bins; i++)
306  {
307  count[bin] = 0;
308  }
309 
310  //Loop over a number of tests
311  for (unsigned int i = 0; i < num_of_tests; i++)
312  {
313  rn = getRandomNumber(0.0, max_num);
314  bin = static_cast<unsigned int>(std::floor(rn * num_of_bins / max_num));
315 
316  //Add one to the bin count
317  count[bin]++;
318 
319  }
320 
321  //Final post-process the result and report on the random number
322  Mdouble chi_cum = 0.0;
323  Mdouble expected = num_of_tests / num_of_bins;
324 
325  for (unsigned int i = 0; i < num_of_bins; i++)
326  {
327  chi_cum = chi_cum + (count[i] - expected) * (count[i] - expected) / expected;
328  logger(INFO, "% : % : %\n", Flusher::NO_FLUSH, i, count[i], (count[i] - expected) * (count[i] - expected) /
329  expected);
330  }
331  //end for loop over computing the chi-squared value.
332  logger(INFO, "chi_cum %", chi_cum);
333 
334  return mathsFunc::chi_squared_prob(chi_cum, num_of_bins);
335 }

References mathsFunc::chi_squared_prob(), FLUSH, getRandomNumber(), constants::i, INFO, and logger.

Referenced by main().

◆ write()

void RNG::write ( std::ostream &  os) const
78 {
79  os << " " << static_cast<unsigned int>(type_);
80  os << " " << a_;
81  os << " " << c_;
82  os << " " << m_;
83  os << " " << p_;
84  os << " " << q_;
86  //for (auto v : randomSeedLaggedFibonacciGenerator_)
87  // os << " " << v;
88 }

References a_, c_, m_, p_, q_, randomSeedLinearCongruentialGenerator_, and type_.

Referenced by DPMBase::write().

Member Data Documentation

◆ a_

unsigned long int RNG::a_
private

This are the two parameters that control the LCG random generated.

Referenced by getRandomNumberFromLinearCongruentialGenerator(), randomise(), read(), RNG(), setLinearCongruentialGeneratorParmeters(), and write().

◆ c_

◆ haveSavedBoxMuller_

bool RNG::haveSavedBoxMuller_
private

A flag that keeps track of whether or not to generate a new pair of normal variates (using Box–Muller)

Referenced by getNormalVariate(), and RNG().

◆ m_

◆ p_

unsigned long int RNG::p_
private

This are the parameters that control the LFG random generator.

Referenced by getRandomNumberFromLaggedFibonacciGenerator(), randomise(), read(), RNG(), seedLaggedFibonacciGenerator(), setLaggedFibonacciGeneratorParameters(), and write().

◆ q_

◆ randomSeedLaggedFibonacciGenerator_

std::vector<Mdouble> RNG::randomSeedLaggedFibonacciGenerator_
private

◆ randomSeedLinearCongruentialGenerator_

unsigned long int RNG::randomSeedLinearCongruentialGenerator_
private

This is the initial seed of the RNG.

Referenced by getRandomNumberFromLinearCongruentialGenerator(), randomise(), read(), RNG(), setRandomSeed(), and write().

◆ savedBoxMuller_

Mdouble RNG::savedBoxMuller_
private

A storage space for the so-far-unused variate from the pair generated by Box–Muller.

Referenced by getNormalVariate(), and RNG().

◆ type_

RNGType RNG::type_
private

This is the type of random number generator.

Referenced by getRandomNumber(), randomise(), read(), RNG(), setRandomNumberGenerator(), and write().


The documentation for this class was generated from the following files:
RNG::getNormalVariate
Mdouble getNormalVariate()
Produces a random number according to a normal distribution with mean 0 and standard deviation 1.
Definition: RNG.cc:163
RNG::c_
unsigned long int c_
Definition: RNG.h:164
RNG::savedBoxMuller_
Mdouble savedBoxMuller_
A storage space for the so-far-unused variate from the pair generated by Box–Muller.
Definition: RNG.h:190
constants::pi
const Mdouble pi
Definition: ExtendedMath.h:45
Flusher::FLUSH
@ FLUSH
RNG::randomSeedLinearCongruentialGenerator_
unsigned long int randomSeedLinearCongruentialGenerator_
This is the initial seed of the RNG.
Definition: RNG.h:154
logger
Logger< MERCURY_LOGLEVEL > logger("MercuryKernel")
Definition of different loggers with certain modules. A user can define its own custom logger here.
mathsFunc::exp
Mdouble exp(Mdouble Exponent)
Definition: ExtendedMath.cc:84
RNG::randomSeedLaggedFibonacciGenerator_
std::vector< Mdouble > randomSeedLaggedFibonacciGenerator_
This is the seeds required for the LFG.
Definition: RNG.h:159
RNG::seedLaggedFibonacciGenerator
void seedLaggedFibonacciGenerator()
This seed the LFG.
Definition: RNG.cc:253
RNG::a_
unsigned long int a_
This are the two parameters that control the LCG random generated.
Definition: RNG.h:164
RNG::q_
unsigned long int q_
Definition: RNG.h:169
INFO
LL< Log::INFO > INFO
Info log level.
Definition: Logger.cc:55
mathsFunc::log
Mdouble log(Mdouble Power)
Definition: ExtendedMath.cc:104
RNG::p_
unsigned long int p_
This are the parameters that control the LFG random generator.
Definition: RNG.h:169
Mdouble
double Mdouble
Definition: GeneralDefine.h:34
ERROR
LL< Log::ERROR > ERROR
Error log level.
Definition: Logger.cc:53
mathsFunc::sin
Mdouble sin(Mdouble x)
Definition: ExtendedMath.cc:44
WARN
LL< Log::WARN > WARN
Warning log level.
Definition: Logger.cc:54
RNG::getRandomNumberFromLinearCongruentialGenerator
Mdouble getRandomNumberFromLinearCongruentialGenerator(Mdouble min, Mdouble max)
This is a basic Linear Congruential Generator Random.
Definition: RNG.cc:234
constants::i
const std::complex< Mdouble > i
Definition: ExtendedMath.h:51
RNGType
RNGType
Definition: RNG.h:39
RNG::setRandomSeed
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:52
RNG::type_
RNGType type_
This is the type of random number generator.
Definition: RNG.h:174
RNG::getRandomNumber
Mdouble getRandomNumber()
This is a random generating routine can be used for initial positions.
Definition: RNG.cc:142
RNG::haveSavedBoxMuller_
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:185
RNG::getRandomNumberFromLaggedFibonacciGenerator
Mdouble getRandomNumberFromLaggedFibonacciGenerator(Mdouble min, Mdouble max)
This is a Lagged Fibonacci Generator.
Definition: RNG.cc:265
MPIContainer::broadcast
std::enable_if< std::is_scalar< T >::value, void >::type broadcast(T &t, int fromProcessor=0)
Broadcasts a scalar from the root to all other processors.
Definition: MpiContainer.h:441
PROCESSOR_ID
#define PROCESSOR_ID
Definition: GeneralDefine.h:63
RNG::m_
unsigned long int m_
Definition: RNG.h:164
RNGType::LAGGED_FIBONACCI_GENERATOR
@ LAGGED_FIBONACCI_GENERATOR
mathsFunc::chi_squared_prob
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
mathsFunc::cos
Mdouble cos(Mdouble x)
Definition: ExtendedMath.cc:64
MPIContainer::Instance
static MPIContainer & Instance()
fetch the instance to be used for communication
Definition: MpiContainer.h:134