CVC4::SubrangeBound Class Reference

Representation of a subrange bound. More...

`#include <subrange_bound.h>`

## Public Member Functions

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

## 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

## SubrangeBound() [1/2]

CVC4::SubrangeBound::SubrangeBound | ( |  | ) |
throw | ( | ) |  |  |

inline

Construct an infinite SubrangeBound.

Definition at line 43 of file subrange_bound.h.

## SubrangeBound() [2/2]

CVC4::SubrangeBound::SubrangeBound | ( | const Integer & | i | ) |
throw | ( | ) |  |  |

inline

Construct a finite SubrangeBound.

Definition at line 49 of file subrange_bound.h.

## ~SubrangeBound()

CVC4::SubrangeBound::~SubrangeBound | ( |  | ) |
throw | ( | ) |  |  |

inline

Definition at line 54 of file subrange_bound.h.

## Member Function Documentation

## getBound()

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().

## hasBound()

bool CVC4::SubrangeBound::hasBound | ( |  | ) | const
throw | ( | ) |  |  |

inline

Returns true iff this is a finite SubrangeBound.

Definition at line 64 of file subrange_bound.h.

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

## max()

static SubrangeBound CVC4::SubrangeBound::max | ( | const SubrangeBound & | a,
|  | const SubrangeBound & | b )

inlinestatic

Definition at line 140 of file subrange_bound.h.

References getBound(), and hasBound().

## min()

static SubrangeBound CVC4::SubrangeBound::min | ( | const SubrangeBound & | a,
|  | const SubrangeBound & | b )

inlinestatic

Definition at line 132 of file subrange_bound.h.

References getBound(), and hasBound().

## operator!=()

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

inline

Test two SubrangeBounds for disequality.

Definition at line 75 of file subrange_bound.h.

## operator<()

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.

## operator<=()

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.

## operator==()

bool CVC4::SubrangeBound::operator== | ( | const SubrangeBound & | b | ) | const
throw | ( | ) |  |  |

inline

Test two SubrangeBounds for equality.

Definition at line 69 of file subrange_bound.h.

## operator>()

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.

## operator>=()

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:

- src/util/subrange_bound.h