42 #include "../../Utils/MapTools.h"
54 invariant_(invariant),
56 nestedPrefix_(dist->getNamespace())
89 for (
size_t i = 0; i < distNCat; i++)
121 for (
size_t i = 1; i < distNCat; i++)
Partial implementation of the DiscreteDistribution interface.
std::vector< double > bounds_
std::map< double, double, Order > distribution_
double getLowerBound() const
methods about the range of the definition
size_t numberOfCategories_
std::shared_ptr< IntervalConstraint > intMinMax_
the interval where the distribution is defined/restricted.
void addParameters_(const ParameterList ¶meters)
void addParameter_(Parameter *parameter)
void setNamespace(const std::string &prefix)
Set the namespace for the parameter names.
virtual void fireParameterChanged(const ParameterList ¶meters)
Notify the class when one or several parameters have changed.
double getParameterValue(const std::string &name) const
Get the value for parameter of name 'name'.
Parameter & getParameter_(const std::string &name)
Exception thrown when a value do not match a given constraint.
The constraint interface.
virtual bool isCorrect(double value) const =0
Tell if a given value is correct.
Interface for discrete distribution objects.
virtual double getBound(size_t) const =0
virtual bool strictLowerBound() const
virtual double getUpperBound() const
virtual double getCategory(size_t categoryIndex) const =0
virtual double getLowerBound() const
methods about the range of the definition
virtual Vdouble getCategories() const =0
virtual Vdouble getProbabilities() const =0
virtual bool strictUpperBound() const
virtual void restrictToConstraint(const Constraint &c)=0
Restricts the distribution to the domain where the constraint is respected, in addition of other pred...
virtual size_t getNumberOfCategories() const =0
void updateDistribution()
std::string nestedPrefix_
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.
void setNamespace(const std::string &prefix)
Set the namespace for the parameter names.
DiscreteDistribution * dist_
InvariantMixedDiscreteDistribution(DiscreteDistribution *dist, double p, double invariant=0.)
Build a new InvariantMixedDiscreteDistribution object.
virtual const ParameterList & getIndependentParameters() const =0
Get the minimal list of parameters to set the model.
The parameter list object.
This class is designed to facilitate the manipulation of parameters.
static const std::shared_ptr< IntervalConstraint > PROP_CONSTRAINT_IN
virtual bool matchParametersValues(const ParameterList ¶meters)=0
Update the parameters from parameters.
virtual void setNamespace(const std::string &prefix)=0
Set the namespace for the parameter names.