5 #ifndef BPP_NUMERIC_PROB_UNIFORMDISCRETEDISTRIBUTION_H 6 #define BPP_NUMERIC_PROB_UNIFORMDISCRETEDISTRIBUTION_H 9 #include "../Constraints.h" 10 #include "../Random/RandomTools.h" 46 std::string
getName()
const {
return "Uniform";}
60 return min_ + x * (max_ -
min_);
65 return (x <= min_) ? 0 : (x -
min_) / (max_ - min_);
70 return (a <= min_) ? 0 : ((a >=
max_) ? (max_ + min_) / 2 : (a * a - min_ *
min_) / (max_ - min_) / 2);
74 #endif // BPP_NUMERIC_PROB_UNIFORMDISCRETEDISTRIBUTION_H Partial implementation of the DiscreteDistribution interface.
The parameter list object.
std::shared_ptr< IntervalConstraint > intMinMax_
the interval where the distribution is defined/restricted.