Simpact Cyan
Population based event driven simulation using mNRM
probabilitydistribution.h
Go to the documentation of this file.
1 #ifndef PROBABILITYDISTRIBUTION_H
2 
3 #define PROBABILITYDISTRIBUTION_H
4 
9 #include <assert.h>
10 
12 
16 {
17 public:
18  ProbabilityDistribution(GslRandomNumberGenerator *pRng) { assert(pRng != 0); m_pRng = pRng; }
19  virtual ~ProbabilityDistribution() { }
20 
23  virtual double pickNumber() const = 0;
24  GslRandomNumberGenerator *getRandomNumberGenerator() const { return m_pRng; }
25 private:
26  mutable GslRandomNumberGenerator *m_pRng;
27 };
28 
29 #endif // PROBABILITYDISTRIBUTION_H
virtual double pickNumber() const =0
Pick a number according to a specific distrubution, specified in a subclass of ProbabilityDistributio...
This class allows you to generate random numbers, and uses the GNU Scientific Library for this...
Definition: gslrandomnumbergenerator.h:16
Abstract base class for probability distribution implementations so that they can be used interchange...
Definition: probabilitydistribution.h:15