ContRap-Libraries
Public Member Functions | Protected Attributes

crp::IntervalF Class Reference

Class IntervalF is the floating point type interval. More...

#include <intervals.h>

Public Member Functions

 IntervalF (double min, double max)
 Creates the interval from its components.
 ~IntervalF ()
 Releases the memory.
double get_min () const
 Returns the minimum bound.
double get_max () const
 Returns the maximum bound.
IntervalF join (const IntervalF &interval)
 Computes the inclusion-minimal interval, which contains the two given intervals.
IntervalF cut (const IntervalF &interval)
 Computes the intersectin of the two intervals.
bool is_empty () const
 Returns true if the interval represents an empty set.

Protected Attributes

double min
 Interval bounds.
double max

Detailed Description

Class IntervalF is the floating point type interval.


Constructor & Destructor Documentation

crp::IntervalF::IntervalF ( double  min,
double  max 
)

Creates the interval from its components.

Parameters:
minLower bound
maxUpper bound
crp::IntervalF::~IntervalF ( )

Releases the memory.


Member Function Documentation

IntervalF crp::IntervalF::cut ( const IntervalF interval)

Computes the intersectin of the two intervals.

Parameters:
intervalThe other interval
Returns:
New interval
double crp::IntervalF::get_max ( ) const [inline]

Returns the maximum bound.

Returns:
Maximum bound
double crp::IntervalF::get_min ( ) const [inline]

Returns the minimum bound.

Returns:
Minimum bound
bool crp::IntervalF::is_empty ( ) const [inline]

Returns true if the interval represents an empty set.

IntervalF crp::IntervalF::join ( const IntervalF interval)

Computes the inclusion-minimal interval, which contains the two given intervals.

Parameters:
intervalThe other interval
Returns:
New interval

Field Documentation

double crp::IntervalF::max [protected]
double crp::IntervalF::min [protected]

Interval bounds.


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