bpp-core3
3.0.0
|
The constraint interface. More...
#include <Bpp/Numeric/Constraints.h>
Public Member Functions | |
ConstraintInterface () | |
virtual | ~ConstraintInterface () |
ConstraintInterface * | clone () const =0 |
Create a copy of this object and send a pointer to it. More... | |
virtual bool | isCorrect (double value) const =0 |
Tell if a given value is correct. More... | |
virtual bool | includes (double min, double max) const =0 |
Tell if all the values in a given interval are correct. More... | |
virtual double | getLimit (double value) const =0 |
Give the nearest limit for a bad value. More... | |
virtual double | getAcceptedLimit (double value) const =0 |
Give the nearest accepted limit for a bad value. More... | |
virtual std::string | getDescription () const =0 |
Give a short description on the type of constraint. More... | |
virtual ConstraintInterface * | operator & (const ConstraintInterface &c) const =0 |
Intersect this Constraint with another one. More... | |
virtual bool | isEmpty () const =0 |
Tells if this constraints defines an empty set. More... | |
The constraint interface.
It provides a method that tells if a given value is correct.
Definition at line 28 of file Constraints.h.
|
inline |
Definition at line 32 of file Constraints.h.
|
inlinevirtual |
Definition at line 33 of file Constraints.h.
References clone(), getAcceptedLimit(), getDescription(), getLimit(), includes(), isCorrect(), isEmpty(), and operator &().
|
pure virtual |
Create a copy of this object and send a pointer to it.
Implements bpp::Clonable.
Implemented in bpp::IntervalConstraint.
Referenced by ~ConstraintInterface().
|
pure virtual |
Give the nearest accepted limit for a bad value.
The difference with getLimit() is when the Constraint is open at the limit, in which case the retruned value is the limit +- 1e-12.
value | The bad value. |
Implemented in bpp::IntervalConstraint.
Referenced by ~ConstraintInterface().
|
pure virtual |
Give a short description on the type of constraint.
Implemented in bpp::IntervalConstraint.
Referenced by ~ConstraintInterface().
|
pure virtual |
Give the nearest limit for a bad value.
value | The bad value. |
Implemented in bpp::IntervalConstraint.
Referenced by ~ConstraintInterface().
|
pure virtual |
Tell if all the values in a given interval are correct.
min,max | The bounds of the interval. |
Implemented in bpp::IntervalConstraint.
Referenced by ~ConstraintInterface().
|
pure virtual |
Tell if a given value is correct.
value | The value to test. |
Implemented in bpp::IntervalConstraint.
Referenced by bpp::IntervalConstraint::getAcceptedLimit(), bpp::IntervalConstraint::getLimit(), bpp::InvariantMixedDiscreteDistribution::restrictToConstraint(), and ~ConstraintInterface().
|
pure virtual |
Tells if this constraints defines an empty set.
Implemented in bpp::IntervalConstraint.
Referenced by ~ConstraintInterface().
|
pure virtual |
Intersect this Constraint with another one.
c | the intersected Constraint |
Implemented in bpp::IntervalConstraint.
Referenced by ~ConstraintInterface().