|
ICAROUS
|
#include <Interval.h>
Public Types | |
| typedef std::vector< Interval >::size_type | nat |
Public Member Functions | |
| Interval (double lb, double ub) | |
| Interval () | |
| Interval (const Interval &i) | |
| int | operator== (const Interval &p) const |
| bool | isEmpty () const |
| std::string | toString () const |
| std::string | toString (int precision) const |
| std::string | toStringUnits (const std::string &unit) const |
| bool | isSingle () const |
| bool | isSingle (double width) const |
| bool | in (double x) const |
| bool | inCC (double x) const |
| bool | inCO (double x) const |
| bool | inOC (double x) const |
| bool | inOO (double x) const |
| bool | almost_in (double x, bool lb_close, bool ub_close) const |
| bool | almost_in (double x, bool lb_close, bool ub_close, INT64FM maxUlps) const |
| bool | overlap (const Interval &r) const |
| Interval | intersect (const Interval &r) const |
| std::string | toPVS () const |
| std::string | toPVS (int precision) const |
Public Attributes | |
| double | low |
| double | up |
Static Public Attributes | |
| static const Interval | EMPTY |
Interval represents a interval of double's from a lower bound to an upper bound. This class is immutable.
Whether the interval is interpreted as open or closed is context-dependent. There are various membership tests allowing for the different interpretations.
| Interval::Interval | ( | double | lb, |
| double | ub | ||
| ) |
Construct an Interval
| lb | lower bound of the region |
| ub | upper bound of the region |
| Interval::Interval | ( | ) |
Construct an empty interval
| Interval::Interval | ( | const Interval & | i | ) |
| bool Interval::almost_in | ( | double | x, |
| bool | lb_close, | ||
| bool | ub_close | ||
| ) | const |
Is the element (almost) in this interval, where close/open conditions are given as parameters
| x | value |
| lb_close | lower bound |
| ub_close | upper bound |
Is the element (almost) in this interval, where close/open conditions are given as parameters
| bool Interval::almost_in | ( | double | x, |
| bool | lb_close, | ||
| bool | ub_close, | ||
| INT64FM | maxUlps | ||
| ) | const |
Is the element (almost) in this interval, where close/open conditions are given as parameters
| x | value |
| lb_close | lower bound |
| ub_close | upper bound |
| maxUlps | tolerance |
Is the element (almost) in this interval, where close/open conditions are given as parameters
| bool Interval::in | ( | double | x | ) | const |
Is the element in this closed/closed interval?
| x | value |
| bool Interval::inCC | ( | double | x | ) | const |
Is the element in this closed/closed interval?
| x | value |
| bool Interval::inCO | ( | double | x | ) | const |
Is the element in this closed/open interval?
| x | value |
| bool Interval::inOC | ( | double | x | ) | const |
Is the element in this open/closed interval?
| x | value |
| bool Interval::inOO | ( | double | x | ) | const |
Is the element in this open/open interval?
| x | value |
| bool Interval::isEmpty | ( | ) | const |
Return true if the interval is empty, or otherwise ill-formed.
| bool Interval::isSingle | ( | ) | const |
Is this interval a single value?
| bool Interval::isSingle | ( | double | width | ) | const |
Is this interval a single value? (with intervals of the indicated width or smaller counting)
| width | width of interval |
| int Interval::operator== | ( | const Interval & | p | ) | const |
Returns true if the bounds of the intervals are equal.
| bool Interval::overlap | ( | const Interval & | r | ) | const |
| std::string Interval::toString | ( | ) | const |
String representation (as a closed interval)
|
static |
An empty interval.
| double larcfm::Interval::low |
The lower bound of this interval
| double larcfm::Interval::up |
The upper bound of this interval