Class for the bound of a variable.
More...
#include <VariableBounds.h>
|
template<typename T1 > |
std::ostream & | operator<< (std::ostream &_out, const Bound< T1 > &_bound) |
| Prints the bound on the given output stream. More...
|
|
template<typename T>
class smtrat::vb::Bound< T >
Class for the bound of a variable.
Definition at line 23 of file VariableBounds.h.
◆ Type
The type of a bounds.
Enumerator |
---|
STRICT_LOWER_BOUND | |
WEAK_LOWER_BOUND | |
EQUAL_BOUND | |
WEAK_UPPER_BOUND | |
STRICT_UPPER_BOUND | |
Definition at line 27 of file VariableBounds.h.
◆ Bound()
Constructs this bound.
- Parameters
-
_limit | A pointer to the limit (rational) of the bound. It is NULL, if the limit is not finite. |
_variable | The variable to which this bound belongs. |
_type | The type of the bound (either it is an equal bound or it is weak resp. strict and upper resp. lower) |
◆ ~Bound()
◆ activate()
Adds an origin to this bound.
- Parameters
-
_origin | The origin to add. |
- Returns
- true, if this has activated this bound; false, if the bound was already active before.
Definition at line 166 of file VariableBounds.h.
◆ deactivate()
Removes an origin from this bound.
- Parameters
-
_origin | The origin to add. |
- Returns
- true, if this has deactivated this bound; false, if the bound was already inactive before.
Definition at line 179 of file VariableBounds.h.
◆ isActive()
- Returns
- true, if this bound is active, which means that there is at least one origin for it left. Note, that origins can be removed belatedly. false, otherwise.
Definition at line 155 of file VariableBounds.h.
◆ isInfinite()
- Returns
- true, if the bound infinite; false, otherwise.
Definition at line 103 of file VariableBounds.h.
◆ isLowerBound()
- Returns
- true, if the bound is a lower bound; false, otherwise.
Definition at line 129 of file VariableBounds.h.
◆ isUpperBound()
- Returns
- true, if the bound is an upper bound; false, otherwise.
Definition at line 120 of file VariableBounds.h.
◆ limit()
- Returns
- A constant reference to the value of the limit. Note, that it must be ensured that the bound is finite before calling this method.
Definition at line 86 of file VariableBounds.h.
◆ operator<()
Checks whether the this bound is smaller than the given one.
- Parameters
-
_bound | The bound to compare with. |
- Returns
- true, if for this bound (A) and the given bound (B) it holds that: A is not inf and B is inf, A smaller than B, where A and B are rationals, A equals B, where A and B are rationals, but A is an equal bound but B is not; false, otherwise.
◆ origins()
- Returns
- A constant reference to the set of origins of this bound.
Definition at line 189 of file VariableBounds.h.
◆ pLimit()
- Returns
- A pointer to the limit of this bound.
Definition at line 94 of file VariableBounds.h.
◆ print()
template<typename T >
void smtrat::vb::Bound< T >::print |
( |
std::ostream & |
_out, |
|
|
bool |
_withRelation = false |
|
) |
| const |
Prints this bound on the given stream.
- Parameters
-
_out | The stream to print on. |
_withRelation | A flag indicating whether to print also a relation symbol in front of the bound value. |
◆ pVariable()
- Returns
- A pointer to the variable wrapper considered by this bound.
Definition at line 137 of file VariableBounds.h.
◆ type()
◆ variable()
- Returns
- A constant reference to the variable wrapper considered by this bound.
Definition at line 145 of file VariableBounds.h.
◆ operator<<
template<typename T >
template<typename T1 >
std::ostream& operator<< |
( |
std::ostream & |
_out, |
|
|
const Bound< T1 > & |
_bound |
|
) |
| |
|
friend |
Prints the bound on the given output stream.
- Parameters
-
_out | The output stream to print on. |
_bound | The bound to print. |
- Returns
- The output stream after printing the bound on it.
◆ mpLimit
A pointer to bound value, which is plus or minus infinity if the pointer is NULL.
Definition at line 33 of file VariableBounds.h.
◆ mpOrigins
A set of origins of the bound, e.g., x-3<0 is the origin of the bound <3.
Definition at line 37 of file VariableBounds.h.
◆ mpVariable
The variable for which the bound is declared.
Definition at line 35 of file VariableBounds.h.
◆ mType
The documentation for this class was generated from the following file: