INTERVAL Class Reference
[Bias/Profil]

This page only reports the modifications brought to the INTERVAL class. More...

#include <Interval.h>

List of all members.

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 &)


Detailed Description

This page only reports the modifications brought to the INTERVAL class.

This class has been augmented with some frequently used features and wrappers for operators that manage infinite bounds.

Attention:
This page only report the modifications brought to the INTERVAL class. See the Bias/Profil documentation for a full description of the INTERVAL class.

Member Function Documentation

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.

Note:
a x can also be an "open bound", i.e., infinity. See the infinite bound section for conventions with infinite bounds

bool INTERVAL::unbounded (  )  const [inline]

Return true iff this interval contains an infinite bound.

Note:
An empty interval is always bounded.

bool INTERVAL::degenerated (  )  const [inline]

Return true iff this interval is degenerated (lower and upper bounds coincide)

Note:
An empty interval is considered here as degenerated.

bool INTERVAL::included ( const INTERVAL outer  )  const [inline]

Return true iff this interval is included in outer.

Note:
Always return true if the interval is empty.

bool INTERVAL::interior ( const INTERVAL outer  )  const [inline]

Return true iff this interval is included in the interior of outer.

Note:
return true if this interval is empty and outer not.

REAL INTERVAL::delta ( const INTERVAL x  )  const [inline]

Compute the diameter of the set difference with x.

Returns:
diam(this \ x).
Precondition:
x must be included in this interval.
Note:
The result may be 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.

Returns:
diam(this \ x) / diam(this).
Precondition:
x must be included in this interval.
Note:
An empty interval is considered to have a null diamater (as a degenerated interval).
  • If either x or this interval is empty, then
    • the method returns 1 (100% of reduction) if this diameter is not null,
    • 0 otherwise (as if 0/0=0).
  • As a pure convention, the method returns 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.

Parameters:
x - the interval to compute the intersection with.
Returns:
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.

Parameters:
x - the interval to compute the hull with.

bool INTERVAL::div_intersect ( const INTERVAL x,
const INTERVAL y,
INTERVAL out2 = NULL 
)

Set this interval to the intersection of itself with the division of two others.

Parameters:
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.
 INTERVAL intv(-10,10);
 INTERVAL out2;
 intv.div_intersect(INTERVAL(2,3), INTERVAL(-1,2), &out2);
 cout << intv << " " << out2 << endl;  // will display: [-oo,-2] [1,+oo]
Returns:
true if the intersection is non empty.
Note:
Contrary to the cset theory, the result is empty if y=[0,0] (whatever x is).
The semantics behind infinite bounds rather conforms to the actual C++ standardization proposal.
See also:
operator* for cases where original Profil division may fail.


Friends And Related Function Documentation

INTERVAL operator* ( REAL  x,
CONST INTERVAL y 
) [friend]

Multiply a real by an interval.

INTERVAL operator* ( CONST INTERVAL x,
REAL  y 
) [friend]

Multiply an interval by a real.

INTERVAL operator* ( CONST INTERVAL x,
CONST INTERVAL y 
) [friend]

Multiply two intervals.

Returns:
x * y.
Note:
Some situations where Bias/Profil may fail (underscore stands for any value):
  • [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]
Warning:
This modified operator is certainly not well optimized yet.

INTERVAL operator/ ( REAL  x,
CONST INTERVAL y 
) [friend]

Divide a real by an interval. See operator/(const INTERVAL &, const INTERVAL &)

INTERVAL operator/ ( CONST INTERVAL x,
REAL  y 
) [friend]

Divide an interval by a real. See operator/(const INTERVAL &, const INTERVAL &)

INTERVAL operator/ ( CONST INTERVAL x,
CONST INTERVAL y 
) [friend]

Divide two intervals.

Returns:
an interval enclosure of x / y.
Note:
Contrary to the cset theory, the result is empty if y=[0,0] (whatever x is).
The semantics behind infinite bounds rather conforms to the actual C++ standardization proposal. This means that an infinite bound is actually an open bound.
See also:
operator* where examples of failure cases are given.
Warning:
This modified operator is certainly not well optimized yet.

INTERVAL operator & ( CONST INTERVAL x,
CONST INTERVAL y 
) [friend]

Return the intersection of x and y.

Returns:
INTERVAL::EMPTY if the intersection is empty.


Member Data Documentation

An empty interval.

An interval containing Pi.


The documentation for this class was generated from the following file:

Generated on Sun Jun 27 15:51:59 2010 for IBEX by  doxygen 1.5.5