mersenneTwister.hpp
Go to the documentation of this file.
1 #ifndef JULIAN_MERSENNETWISTER_HPP
2 #define JULIAN_MERSENNETWISTER_HPP
3 
5 #include <gsl/gsl_rng.h>
6 
7 namespace julian {
8 
23  class MersenneTwister: public UniformRNG {
24  public:
28 
29  virtual double getRandom();
30  virtual std::vector<double> getRandoms(int);
31  virtual void setSeed(unsigned int);
32  virtual MersenneTwister* clone() const;
33  virtual ~MersenneTwister();
34  private:
35  gsl_rng * rnd_;
36  };
37 
38 }
39 
40 
41 #endif /* MERSENNETWISTER_HPP */
virtual ~MersenneTwister()
destructor
Definition: mersenneTwister.cpp:73
Definition: cadHoliday.cpp:3
MersenneTwister & operator=(MersenneTwister)
Copy assignment operator.
Definition: mersenneTwister.cpp:28
gsl_rng * rnd_
GSL random number generator.
Definition: mersenneTwister.hpp:35
Class implements Mersenne Twister RNG.
Definition: mersenneTwister.hpp:23
File contains implementation of RNG generating random variables from uniform distribution.
virtual MersenneTwister * clone() const
Virtual copy constructor.
Definition: mersenneTwister.cpp:57
MersenneTwister()
Constructor.
Definition: mersenneTwister.cpp:10
virtual std::vector< double > getRandoms(int)
generate n random variables from uniform distribution.
Definition: mersenneTwister.cpp:45
virtual void setSeed(unsigned int)
sets seed of RNG
Definition: mersenneTwister.cpp:65
virtual double getRandom()
generate one random variable from uniform distribution.
Definition: mersenneTwister.cpp:37
Class implements interface for uniform number generators.
Definition: uniformRNG.hpp:21