Simpact Cyan
Population based event driven simulation using mNRM
fixedvaluedistribution2d.h
Go to the documentation of this file.
1 #ifndef FIXEDVALUEDISTRIBUTION2D_H
2 
3 #define FIXEDVALUEDISTRIBUTION2D_H
4 
10 
15 {
16 public:
18  FixedValueDistribution2D(double xValue, double yValue, GslRandomNumberGenerator *pRndGen) : ProbabilityDistribution2D(pRndGen, true)
19  { m_xValue = xValue; m_yValue = yValue; }
21 
22 
23  Point2D pickPoint() const { return Point2D(m_xValue, m_yValue); }
24  double pickMarginalX() const { return m_xValue; }
25  double pickMarginalY() const { return m_yValue; }
26  double pickConditionalOnX(double x) const { return m_yValue; }
27  double pickConditionalOnY(double y) const { return m_xValue; }
28 
29  double getXValue() const { return m_xValue; }
30  double getYValue() const { return m_yValue; }
31 private:
32  double m_xValue, m_yValue;
33 };
34 
35 #endif // FIXEDVALUEDISTRIBUTION2D_H
36 
FixedValueDistribution2D(double xValue, double yValue, GslRandomNumberGenerator *pRndGen)
Constructor of the class, in which the value to be always returned is specified.
Definition: fixedvaluedistribution2d.h:18
Not actually a 2D distribution, but can be used to force specific values to be generated every time...
Definition: fixedvaluedistribution2d.h:14
Point2D pickPoint() const
Pick a point according to a specific distrubution, specified in a subclass of ProbabilityDistribution...
Definition: fixedvaluedistribution2d.h:23
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:17