Excluding interval. More...
#include <Bpp/Numeric/Constraints.h>


Public Member Functions | |
| ExcludingInterval (double lowerBound, double upperBound, double precision=NumConstants::TINY) | |
| Build a new excluding interval constraint. | |
| ExcludingInterval * | clone () const |
| Create a copy of this object and send a pointer to it. | |
| bool | isCorrect (double value) const |
| Tell if a given value is correct. | |
| void | setLowerBound (double lowerBound, bool strict) |
| void | setUpperBound (double upperBound, bool strict) |
| double | getLowerBound () const |
| double | getUpperBound () const |
| bool | strictLowerBound () const |
| bool | strictUpperBound () const |
| bool | includes (double min, double max) const |
| Tell if all the values in a given interval are correct. | |
| bool | operator< (double value) const |
| bool | operator> (double value) const |
| bool | operator<= (double value) const |
| bool | operator<= (const Interval &i) const |
| Tells if this interval is included or equal in another one. | |
| bool | operator>= (double value) const |
| double | getLimit (double value) const |
| Give the nearest limit for a bad value. | |
| double | getAcceptedLimit (double value) const |
| Give the nearest accepted limit for a bad value. | |
| double | getPrecision () const |
| std::string | getDescription () const |
| Give a short description on the type of constraint. | |
| Constraint * | operator& (const Constraint &c) const |
| Intersect this Interval with another one. | |
| Interval & | operator&= (const Constraint &c) |
| Intersect this Interval with another one. | |
| bool | operator== (const Interval &i) const |
| Tells if this interval equals another one. | |
| bool | operator!= (const Interval &i) const |
| Tells if this interval is different from another one. | |
Protected Attributes | |
| double | lowerBound_ |
| The boundaries of the interval. | |
| double | upperBound_ |
| bool | inclLowerBound_ |
| Boolean flags are true if the boundaries are included. | |
| bool | inclUpperBound_ |
| double | precision_ |
| the accepted precision on the boundary (default: 1e-12) | |
Excluding interval.
Definition at line 452 of file Constraints.h.
| bpp::ExcludingInterval::ExcludingInterval | ( | double | lowerBound, | |
| double | upperBound, | |||
| double | precision = NumConstants::TINY | |||
| ) | [inline] |
Build a new excluding interval constraint.
| lowerBound | The lower bound of the interval. | |
| upperBound | The upper bound of the interval. |
Definition at line 461 of file Constraints.h.
Referenced by clone().
| ExcludingInterval* bpp::ExcludingInterval::clone | ( | ) | const [inline, virtual] |
Create a copy of this object and send a pointer to it.
Reimplemented from bpp::Interval.
Definition at line 464 of file Constraints.h.
References ExcludingInterval().
| double bpp::Interval::getAcceptedLimit | ( | double | value | ) | const [inline, virtual, inherited] |
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. |
Implements bpp::Constraint.
Definition at line 211 of file Constraints.h.
References bpp::Interval::isCorrect(), bpp::Interval::lowerBound_, bpp::Interval::precision_, bpp::Interval::strictLowerBound(), bpp::Interval::strictUpperBound(), and bpp::Interval::upperBound_.
| std::string bpp::Interval::getDescription | ( | ) | const [inline, virtual, inherited] |
Give a short description on the type of constraint.
Implements bpp::Constraint.
Definition at line 224 of file Constraints.h.
References bpp::Interval::inclLowerBound_, bpp::Interval::inclUpperBound_, bpp::Interval::lowerBound_, bpp::TextTools::toString(), bpp::Interval::upperBound_, and bpp::NumConstants::VERY_BIG.
| double bpp::Interval::getLimit | ( | double | value | ) | const [inline, virtual, inherited] |
Give the nearest limit for a bad value.
| value | The bad value. |
Implements bpp::Constraint.
Definition at line 205 of file Constraints.h.
References bpp::Interval::isCorrect(), bpp::Interval::lowerBound_, and bpp::Interval::upperBound_.
| double bpp::Interval::getLowerBound | ( | ) | const [inline, inherited] |
Definition at line 167 of file Constraints.h.
References bpp::Interval::lowerBound_.
Referenced by bpp::AbstractDiscreteDistribution::discretize(), bpp::BetaDiscreteDistribution::fireParameterChanged(), bpp::Interval::includes(), bpp::ReparametrizationFunctionWrapper::init_(), bpp::ExcludingIncludingInterval::isCorrect(), bpp::IncludingExcludingInterval::isCorrect(), isCorrect(), bpp::IncludingInterval::isCorrect(), bpp::ExcludingPositiveReal::isCorrect(), bpp::IncludingPositiveReal::isCorrect(), bpp::Interval::isCorrect(), and bpp::InvariantMixedDiscreteDistribution::updateDistribution().
| double bpp::Interval::getPrecision | ( | ) | const [inline, inherited] |
Definition at line 219 of file Constraints.h.
References bpp::Interval::precision_.
Referenced by bpp::Interval::operator&(), and bpp::Interval::operator&=().
| double bpp::Interval::getUpperBound | ( | ) | const [inline, inherited] |
Definition at line 168 of file Constraints.h.
References bpp::Interval::upperBound_.
Referenced by bpp::AbstractDiscreteDistribution::discretize(), bpp::SimpleDiscreteDistribution::fireParameterChanged(), bpp::BetaDiscreteDistribution::fireParameterChanged(), bpp::Interval::includes(), bpp::ReparametrizationFunctionWrapper::init_(), bpp::ExcludingIncludingInterval::isCorrect(), bpp::IncludingExcludingInterval::isCorrect(), isCorrect(), bpp::IncludingInterval::isCorrect(), bpp::Interval::isCorrect(), and bpp::InvariantMixedDiscreteDistribution::updateDistribution().
| bool bpp::Interval::includes | ( | double | min, | |
| double | max | |||
| ) | const [inline, virtual, inherited] |
Tell if all the values in a given interval are correct.
| min,max | The bounds of the interval. |
Implements bpp::Constraint.
Definition at line 173 of file Constraints.h.
References bpp::Interval::getLowerBound(), bpp::Interval::getUpperBound(), bpp::Interval::inclLowerBound_, and bpp::Interval::inclUpperBound_.
| bool bpp::ExcludingInterval::isCorrect | ( | double | value | ) | const [inline, virtual] |
Tell if a given value is correct.
| value | The value to test. |
Reimplemented from bpp::Interval.
Definition at line 466 of file Constraints.h.
References bpp::Interval::getLowerBound(), and bpp::Interval::getUpperBound().
| bool bpp::Interval::operator!= | ( | const Interval & | i | ) | const [inline, inherited] |
Tells if this interval is different from another one.
| i | the compared Interval |
Definition at line 336 of file Constraints.h.
References bpp::Interval::inclLowerBound_, bpp::Interval::inclUpperBound_, bpp::Interval::lowerBound_, and bpp::Interval::upperBound_.
| Constraint* bpp::Interval::operator& | ( | const Constraint & | c | ) | const [inline, virtual, inherited] |
Intersect this Interval with another one.
| c | the intersected Interval |
Implements bpp::Constraint.
Definition at line 240 of file Constraints.h.
References bpp::Interval::getPrecision(), bpp::Interval::inclLowerBound_, bpp::Interval::inclUpperBound_, bpp::Interval::Interval(), bpp::Interval::lowerBound_, bpp::Interval::precision_, and bpp::Interval::upperBound_.
| Interval& bpp::Interval::operator&= | ( | const Constraint & | c | ) | [inline, inherited] |
Intersect this Interval with another one.
| c | the intersected Interval |
Definition at line 284 of file Constraints.h.
References bpp::Interval::getPrecision(), bpp::Interval::inclLowerBound_, bpp::Interval::inclUpperBound_, bpp::Interval::lowerBound_, bpp::Interval::precision_, and bpp::Interval::upperBound_.
| bool bpp::Interval::operator< | ( | double | value | ) | const [inline, inherited] |
Definition at line 185 of file Constraints.h.
References bpp::Interval::inclUpperBound_, and bpp::Interval::upperBound_.
| bool bpp::Interval::operator<= | ( | const Interval & | i | ) | const [inline, inherited] |
Tells if this interval is included or equal in another one.
| i | the compared Interval |
Definition at line 349 of file Constraints.h.
References bpp::Interval::lowerBound_, and bpp::Interval::upperBound_.
| bool bpp::Interval::operator<= | ( | double | value | ) | const [inline, inherited] |
Definition at line 195 of file Constraints.h.
References bpp::Interval::upperBound_.
| bool bpp::Interval::operator== | ( | const Interval & | i | ) | const [inline, inherited] |
Tells if this interval equals another one.
| i | the compared Interval |
Definition at line 323 of file Constraints.h.
References bpp::Interval::inclLowerBound_, bpp::Interval::inclUpperBound_, bpp::Interval::lowerBound_, and bpp::Interval::upperBound_.
| bool bpp::Interval::operator> | ( | double | value | ) | const [inline, inherited] |
Definition at line 190 of file Constraints.h.
References bpp::Interval::inclLowerBound_, and bpp::Interval::lowerBound_.
| bool bpp::Interval::operator>= | ( | double | value | ) | const [inline, inherited] |
Definition at line 200 of file Constraints.h.
References bpp::Interval::lowerBound_.
| void bpp::Interval::setLowerBound | ( | double | lowerBound, | |
| bool | strict | |||
| ) | [inline, inherited] |
Definition at line 164 of file Constraints.h.
References bpp::Interval::inclLowerBound_, and bpp::Interval::lowerBound_.
Referenced by bpp::BetaDiscreteDistribution::BetaDiscreteDistribution(), bpp::ExponentialDiscreteDistribution::ExponentialDiscreteDistribution(), bpp::BetaDiscreteDistribution::fireParameterChanged(), bpp::GammaDiscreteDistribution::GammaDiscreteDistribution(), bpp::SimpleDiscreteDistribution::SimpleDiscreteDistribution(), bpp::TruncatedExponentialDiscreteDistribution::TruncatedExponentialDiscreteDistribution(), bpp::UniformDiscreteDistribution::UniformDiscreteDistribution(), bpp::MixtureOfDiscreteDistributions::updateDistribution(), and bpp::InvariantMixedDiscreteDistribution::updateDistribution().
| void bpp::Interval::setUpperBound | ( | double | upperBound, | |
| bool | strict | |||
| ) | [inline, inherited] |
Definition at line 165 of file Constraints.h.
References bpp::Interval::inclUpperBound_, and bpp::Interval::upperBound_.
Referenced by bpp::BetaDiscreteDistribution::BetaDiscreteDistribution(), bpp::TruncatedExponentialDiscreteDistribution::fireParameterChanged(), bpp::BetaDiscreteDistribution::fireParameterChanged(), bpp::SimpleDiscreteDistribution::SimpleDiscreteDistribution(), bpp::TruncatedExponentialDiscreteDistribution::TruncatedExponentialDiscreteDistribution(), bpp::UniformDiscreteDistribution::UniformDiscreteDistribution(), bpp::MixtureOfDiscreteDistributions::updateDistribution(), and bpp::InvariantMixedDiscreteDistribution::updateDistribution().
| bool bpp::Interval::strictLowerBound | ( | ) | const [inline, inherited] |
Definition at line 170 of file Constraints.h.
References bpp::Interval::inclLowerBound_.
Referenced by bpp::AbstractDiscreteDistribution::discretize(), and bpp::Interval::getAcceptedLimit().
| bool bpp::Interval::strictUpperBound | ( | ) | const [inline, inherited] |
Definition at line 171 of file Constraints.h.
References bpp::Interval::inclUpperBound_.
Referenced by bpp::AbstractDiscreteDistribution::discretize(), and bpp::Interval::getAcceptedLimit().
bool bpp::Interval::inclLowerBound_ [protected, inherited] |
Boolean flags are true if the boundaries are included.
Definition at line 136 of file Constraints.h.
Referenced by bpp::Interval::getDescription(), bpp::Interval::includes(), bpp::Interval::isCorrect(), bpp::Interval::operator!=(), bpp::Interval::operator&(), bpp::Interval::operator&=(), bpp::Interval::operator==(), bpp::Interval::operator>(), bpp::Interval::setLowerBound(), and bpp::Interval::strictLowerBound().
bool bpp::Interval::inclUpperBound_ [protected, inherited] |
Definition at line 136 of file Constraints.h.
Referenced by bpp::Interval::getDescription(), bpp::Interval::includes(), bpp::Interval::isCorrect(), bpp::Interval::operator!=(), bpp::Interval::operator&(), bpp::Interval::operator&=(), bpp::Interval::operator<(), bpp::Interval::operator==(), bpp::Interval::setUpperBound(), and bpp::Interval::strictUpperBound().
double bpp::Interval::lowerBound_ [protected, inherited] |
The boundaries of the interval.
Definition at line 130 of file Constraints.h.
Referenced by bpp::Interval::getAcceptedLimit(), bpp::Interval::getDescription(), bpp::Interval::getLimit(), bpp::Interval::getLowerBound(), bpp::Interval::operator!=(), bpp::Interval::operator&(), bpp::Interval::operator&=(), bpp::Interval::operator<=(), bpp::Interval::operator==(), bpp::Interval::operator>(), bpp::Interval::operator>=(), and bpp::Interval::setLowerBound().
double bpp::Interval::precision_ [protected, inherited] |
the accepted precision on the boundary (default: 1e-12)
Definition at line 142 of file Constraints.h.
Referenced by bpp::Interval::getAcceptedLimit(), bpp::Interval::getPrecision(), bpp::Interval::operator&(), and bpp::Interval::operator&=().
double bpp::Interval::upperBound_ [protected, inherited] |
Definition at line 130 of file Constraints.h.
Referenced by bpp::Interval::getAcceptedLimit(), bpp::Interval::getDescription(), bpp::Interval::getLimit(), bpp::Interval::getUpperBound(), bpp::Interval::operator!=(), bpp::Interval::operator&(), bpp::Interval::operator&=(), bpp::Interval::operator<(), bpp::Interval::operator<=(), bpp::Interval::operator==(), and bpp::Interval::setUpperBound().
1.6.3