cvc4-1.4
CVC4::SubrangeBound Class Reference

Representation of a subrange bound. More...

#include <subrange_bound.h>

Public Member Functions

 SubrangeBound () throw ()
 Construct an infinite SubrangeBound. More...
 
 SubrangeBound (const Integer &i) throw ()
 Construct a finite SubrangeBound. More...
 
 ~SubrangeBound () throw ()
 
const IntegergetBound () const throw (IllegalArgumentException)
 Get the finite SubrangeBound, failing an assertion if infinite. More...
 
bool hasBound () const throw ()
 Returns true iff this is a finite SubrangeBound. More...
 
bool operator== (const SubrangeBound &b) const throw ()
 Test two SubrangeBounds for equality. More...
 
bool operator!= (const SubrangeBound &b) const throw ()
 Test two SubrangeBounds for disequality. More...
 
bool operator< (const SubrangeBound &b) const throw ()
 Is this SubrangeBound "less than" another? For two SubrangeBounds that "have bounds," this is defined as expected. More...
 
bool operator<= (const SubrangeBound &b) const throw ()
 Is this SubrangeBound "less than or equal to" another? For two SubrangeBounds that "have bounds," this is defined as expected. More...
 
bool operator> (const SubrangeBound &b) const throw ()
 Is this SubrangeBound "greater than" another? For two SubrangeBounds that "have bounds," this is defined as expected. More...
 
bool operator>= (const SubrangeBound &b) const throw ()
 Is this SubrangeBound "greater than or equal to" another? For two SubrangeBounds that "have bounds," this is defined as expected. More...
 

Static Public Member Functions

static SubrangeBound min (const SubrangeBound &a, const SubrangeBound &b)
 
static SubrangeBound max (const SubrangeBound &a, const SubrangeBound &b)
 

Detailed Description

Representation of a subrange bound.

A bound can either exist and be a finite arbitrary-precision integer, or not exist (and thus be an infinite bound). For example, the CVC language subrange [-5.._] has a lower bound of -5 and an infinite upper bound.

Definition at line 36 of file subrange_bound.h.

Constructor & Destructor Documentation

CVC4::SubrangeBound::SubrangeBound ( )
throw (
)
inline

Construct an infinite SubrangeBound.

Definition at line 43 of file subrange_bound.h.

CVC4::SubrangeBound::SubrangeBound ( const Integer i)
throw (
)
inline

Construct a finite SubrangeBound.

Definition at line 49 of file subrange_bound.h.

CVC4::SubrangeBound::~SubrangeBound ( )
throw (
)
inline

Definition at line 54 of file subrange_bound.h.

Member Function Documentation

const Integer& CVC4::SubrangeBound::getBound ( ) const
throw (IllegalArgumentException
)
inline

Get the finite SubrangeBound, failing an assertion if infinite.

Definition at line 58 of file subrange_bound.h.

References CVC4::CheckArgument().

Referenced by max(), min(), CVC4::SubrangeBoundsHashFunction::operator()(), and CVC4::SubrangeBounds::SubrangeBounds().

bool CVC4::SubrangeBound::hasBound ( ) const
throw (
)
inline
static SubrangeBound CVC4::SubrangeBound::max ( const SubrangeBound a,
const SubrangeBound b 
)
inlinestatic

Definition at line 140 of file subrange_bound.h.

References getBound(), hasBound(), and CVC4::Integer::max().

Referenced by CVC4::SubrangeBounds::join().

static SubrangeBound CVC4::SubrangeBound::min ( const SubrangeBound a,
const SubrangeBound b 
)
inlinestatic

Definition at line 132 of file subrange_bound.h.

References getBound(), hasBound(), and CVC4::Integer::min().

Referenced by CVC4::SubrangeBounds::join().

bool CVC4::SubrangeBound::operator!= ( const SubrangeBound b) const
throw (
)
inline

Test two SubrangeBounds for disequality.

Definition at line 75 of file subrange_bound.h.

bool CVC4::SubrangeBound::operator< ( const SubrangeBound b) const
throw (
)
inline

Is this SubrangeBound "less than" another? For two SubrangeBounds that "have bounds," this is defined as expected.

For a finite SubrangeBound b1 and a SubrangeBounds b2 without a bound, b1 < b2 (but note also that b1 > b2). This strange behavior is due to the fact that a SubrangeBound without a bound is the representation for both +infinity and -infinity.

Definition at line 87 of file subrange_bound.h.

bool CVC4::SubrangeBound::operator<= ( const SubrangeBound b) const
throw (
)
inline

Is this SubrangeBound "less than or equal to" another? For two SubrangeBounds that "have bounds," this is defined as expected.

For a finite SubrangeBound b1 and a SubrangeBounds b2 without a bound, b1 < b2 (but note also that b1 > b2). This strange behavior is due to the fact that a SubrangeBound without a bound is the representation for both +infinity and -infinity.

Definition at line 100 of file subrange_bound.h.

bool CVC4::SubrangeBound::operator== ( const SubrangeBound b) const
throw (
)
inline

Test two SubrangeBounds for equality.

Definition at line 69 of file subrange_bound.h.

bool CVC4::SubrangeBound::operator> ( const SubrangeBound b) const
throw (
)
inline

Is this SubrangeBound "greater than" another? For two SubrangeBounds that "have bounds," this is defined as expected.

For a finite SubrangeBound b1 and a SubrangeBounds b2 without a bound, b1 > b2 (but note also that b1 < b2). This strange behavior is due to the fact that a SubrangeBound without a bound is the representation for both +infinity and -infinity.

Definition at line 113 of file subrange_bound.h.

bool CVC4::SubrangeBound::operator>= ( const SubrangeBound b) const
throw (
)
inline

Is this SubrangeBound "greater than or equal to" another? For two SubrangeBounds that "have bounds," this is defined as expected.

For a finite SubrangeBound b1 and a SubrangeBounds b2 without a bound, b1 > b2 (but note also that b1 < b2). This strange behavior is due to the fact that a SubrangeBound without a bound is the representation for both +infinity and -infinity.

Definition at line 126 of file subrange_bound.h.


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