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