1 #ifndef DISCRETEDISTRIBUTIONWRAPPER_H
3 #define DISCRETEDISTRIBUTIONWRAPPER_H
11 class DiscreteDistributionFast;
18 ~DiscreteDistributionWrapper();
20 bool_t init(
const std::string &csvFileName,
double xMin,
double xMax,
int yCol,
bool floor);
21 bool_t init(
const std::string &csvFileName,
int xCol,
int yCol,
bool floor);
22 bool_t init(
const std::vector<double> &xValues,
const std::vector<double> &yValues,
bool floor);
24 double pickNumber()
const {
if (m_pDist == 0)
return std::numeric_limits<double>::quiet_NaN();
return m_pDist->pickNumber(); }
26 int getXCol()
const {
return m_xCol; }
27 int getYCol()
const {
return m_yCol; }
28 double getXMin()
const {
return m_xMin; }
29 double getXMax()
const {
return m_xMax; }
30 std::string getFileName()
const {
return m_fileName; }
31 bool getFloor()
const {
return m_floor; }
33 const std::vector<double> &getXValues()
const {
return m_xValues; }
34 const std::vector<double> &getYValues()
const {
return m_yValues; }
38 double m_xMin, m_xMax;
39 std::string m_fileName;
42 std::vector<double> m_xValues;
43 std::vector<double> m_yValues;
46 #endif // DISCRETEDISTRIBUTIONWRAPPER_H
Type to return true/false with error description.
Definition: booltype.h:25
virtual double pickNumber() const =0
Pick a number according to a specific distrubution, specified in a subclass of ProbabilityDistributio...
Helper class to generate random numbers based on some kind of discrete distribution.
Definition: discretedistribution.h:20
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