#include <Interval.h>
Public Member Functions | |
| void | set_empty () |
| bool | empty () const |
| bool | contains (const REAL &x) const |
| bool | unbounded () const |
| bool | degenerated () const |
| bool | included (const INTERVAL &outer) const |
| bool | interior (const INTERVAL &outer) const |
| REAL | delta (const INTERVAL &x) const |
| REAL | ratiodelta (const INTERVAL &x) const |
| bool | operator &= (const INTERVAL &x) |
| void | operator|= (const INTERVAL &x) |
| bool | div_intersect (const INTERVAL &x, const INTERVAL &y, INTERVAL *out2=NULL) |
Static Public Attributes | |
| static INTERVAL | EMPTY |
| static INTERVAL | Pi |
Friends | |
| INTERVAL | operator* (REAL, CONST INTERVAL &) |
| INTERVAL | operator* (CONST INTERVAL &, REAL) |
| INTERVAL | operator* (CONST INTERVAL &, CONST INTERVAL &) |
| INTERVAL | operator/ (REAL, CONST INTERVAL &) |
| INTERVAL | operator/ (CONST INTERVAL &, REAL) |
| INTERVAL | operator/ (CONST INTERVAL &, CONST INTERVAL &) |
| INTERVAL | operator & (CONST INTERVAL &, CONST INTERVAL &) |
This class has been augmented with some frequently used features and wrappers for operators that manage infinite bounds.
| void INTERVAL::set_empty | ( | ) | [inline] |
Set this interval to the empty set.
| bool INTERVAL::empty | ( | ) | const [inline] |
Return true iff this interval is empty.
| bool INTERVAL::contains | ( | const REAL & | x | ) | const [inline] |
Return true iff this interval contains x.
| bool INTERVAL::unbounded | ( | ) | const [inline] |
Return true iff this interval contains an infinite bound.
| bool INTERVAL::degenerated | ( | ) | const [inline] |
Return true iff this interval is degenerated (lower and upper bounds coincide)
| bool INTERVAL::included | ( | const INTERVAL & | outer | ) | const [inline] |
Return true iff this interval is included in outer.
| bool INTERVAL::interior | ( | const INTERVAL & | outer | ) | const [inline] |
Return true iff this interval is included in the interior of outer.
| REAL INTERVAL::delta | ( | const INTERVAL & | x | ) | const [inline] |
Compute the diameter of the set difference with x.
BiasPosInf if the set difference is infinite.
An empty interval is considered here to have a null diamater (as a degenerated interval).
If either x or this interval is empty, then the method returns the diameter of this interval (which is 0 if the latter is empty).
| REAL INTERVAL::ratiodelta | ( | const INTERVAL & | x | ) | const [inline] |
Compute the ratio of this diameter to the diameter of the set difference with an interval x.
1 if one bound of this interval is infinite and the corresponding bound of x is not (in particular if this interval is unbounded and x not). | bool INTERVAL::operator &= | ( | const INTERVAL & | x | ) | [inline] |
Set this interval to the intersection of itself with another interval x.
| x | - the interval to compute the intersection with. |
true if the intersection is non empty. | void INTERVAL::operator|= | ( | const INTERVAL & | x | ) | [inline] |
Set this interval to the hull of itself with another interval x.
| x | - the interval to compute the hull with. |
Set this interval to the intersection of itself with the division of two others.
| x | - the numerator | |
| y | - the divisor | |
| out2 | (optional) - If this parameter is not null, the generalized division is performed (see Hansen) and, in return, *this and *out2 contains the lower and upper part respectively of the division. The interval out2 is not allocated by the method. |
true if the intersection is non empty.
Multiply two intervals.
[0,0] * [-inf,_] [0,0] * [_,inf] [-inf,_] * [_,0] [_,inf] * [_,0] [-0,_] * [_,inf] [inf([0,0])*-1,1] * [1,inf]
[inf([0,0])*-1,1] * [-inf,1] Divide a real by an interval. See operator/(const INTERVAL &, const INTERVAL &)
Divide an interval by a real. See operator/(const INTERVAL &, const INTERVAL &)
Divide two intervals.
INTERVAL INTERVAL::EMPTY [static] |
An empty interval.
INTERVAL INTERVAL::Pi [static] |
An interval containing Pi.
1.5.5