Parma_Polyhedra_Library::Boundary Class Reference
[C++ Language Interface]

An extended rational bound of an interval. More...

#include <Interval.defs.hh>

Inheritance diagram for Parma_Polyhedra_Library::Boundary:

Inheritance graph
[legend]

List of all members.

Public Member Functions

bool is_closed () const
 Returns true if and only if *this is a closed bound.
const ERationalbound () const
 Returns a const reference to the value of the bound.
ERationalbound ()
 Returns a reference to the value of the bound.

Protected Types

enum  Flag { NEG = -1, ZERO = 0, POS = 1 }
 Kinds of bounds. More...

Protected Member Functions

 Boundary (const ERational &v, Flag f)
 Builds a bound of kind f and having value v.

Protected Attributes

ERational value
 The extended rational value of the bound.
Flag flag
 The kind of the bound.

Friends

bool operator< (const Boundary &x, const Boundary &y)
 Returns true if and only if x is less than y.
bool operator> (const Boundary &x, const Boundary &y)
 Returns true if and only if x is greater than y.


Detailed Description

An extended rational bound of an interval.

An object of class Boundary represents either an upper or a lower bound of an interval over the set of extended rational numbers.

Definition at line 62 of file Interval.defs.hh.


Member Enumeration Documentation

Kinds of bounds.

Enumerator:
NEG  An open upper bound.
ZERO  A closed (lower or upper) bound.
POS  An open lower bound.

Definition at line 65 of file Interval.defs.hh.

00065             {
00067     NEG = -1,
00069     ZERO = 0,
00071     POS = 1
00072   };


Constructor & Destructor Documentation

Parma_Polyhedra_Library::Boundary::Boundary ( const ERational v,
Flag  f 
) [inline, protected]

Builds a bound of kind f and having value v.

Definition at line 33 of file Interval.inlines.hh.

00034   : value(v), flag(f) {
00035 }


Member Function Documentation

bool Parma_Polyhedra_Library::Boundary::is_closed (  )  const [inline]

Returns true if and only if *this is a closed bound.

Definition at line 38 of file Interval.inlines.hh.

References flag, and ZERO.

Referenced by interval_term(), and Parma_Polyhedra_Library::Polyhedron::shrink_bounding_box().

00038                           {
00039   return flag == ZERO;
00040 }

const ERational & Parma_Polyhedra_Library::Boundary::bound (  )  const [inline]

Returns a const reference to the value of the bound.

Definition at line 43 of file Interval.inlines.hh.

References value.

Referenced by Parma_Polyhedra_Library::Bounding_Box::CC76_widening_assign(), interval_term(), and Parma_Polyhedra_Library::Polyhedron::shrink_bounding_box().

00043                       {
00044   return value;
00045 }

ERational & Parma_Polyhedra_Library::Boundary::bound (  )  [inline]

Returns a reference to the value of the bound.

Definition at line 48 of file Interval.inlines.hh.

References value.

00048                 {
00049   return value;
00050 }


Friends And Related Function Documentation

bool operator< ( const Boundary x,
const Boundary y 
) [friend]

Returns true if and only if x is less than y.

Definition at line 64 of file Interval.inlines.hh.

00064                                                 {
00065   return x.value < y.value ||
00066     (x.value == y.value && x.flag < y.flag);
00067 }

bool operator> ( const Boundary x,
const Boundary y 
) [friend]

Returns true if and only if x is greater than y.

Definition at line 71 of file Interval.inlines.hh.

00071                                                 {
00072   return y < x;
00073 }


Member Data Documentation

The extended rational value of the bound.

Definition at line 75 of file Interval.defs.hh.

Referenced by bound().

The kind of the bound.

Definition at line 77 of file Interval.defs.hh.

Referenced by is_closed(), Parma_Polyhedra_Library::UBoundary::OK(), and Parma_Polyhedra_Library::LBoundary::OK().


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

Generated on Wed Jul 16 22:55:50 2008 for PPL by  doxygen 1.5.6