93 throw Exception(
"ConstantDistribution::restrictToConstraint: Non-interval exception");
Partial implementation of the DiscreteDistribution interface.
virtual void restrictToConstraint(const Constraint &c)
Restricts the distribution to the domain where the constraint is respected, in addition of other pred...
std::map< double, double, Order > distribution_
AbstractDiscreteDistribution & operator=(const AbstractDiscreteDistribution &adde)
std::shared_ptr< IntervalConstraint > intMinMax_
the interval where the distribution is defined/restricted.
void addParameter_(Parameter *parameter)
virtual void fireParameterChanged(const ParameterList ¶meters)
Notify the class when one or several parameters have changed.
size_t getNumberOfParameters() const
Get the number of parameters.
double getParameterValue(const std::string &name) const
Get the value for parameter of name 'name'.
Parameter & getParameter_(const std::string &name)
Constant discrete distribution.
ConstantDistribution(double value)
Builds a new ConstantDistribution object from a value.
ConstantDistribution & operator=(const ConstantDistribution &)
void restrictToConstraint(const Constraint &c)
Restricts the distribution to the domain where the constraint is respected, in addition of other pred...
void fireParameterChanged(const ParameterList ¶meters)
Notify the class when one or several parameters have changed.
Exception thrown when a value do not match a given constraint.
The constraint interface.
Exception base class. Overload exception constructor (to control the exceptions mechanism)....
An interval, either bounded or not, which can also have infinite bounds.
virtual bool isCorrect(double value) const
Tell if a given value is correct.
The parameter list object.
This class is designed to facilitate the manipulation of parameters.
virtual void setConstraint(std::shared_ptr< Constraint > constraint)
Set a constraint to this parameter.