![]() |
SMT-RAT
24.02
Toolbox for Strategic and Parallel Satisfiability-Modulo-Theories Solving
|
Class to manage the bounds of a variable. More...
#include <VariableBounds.h>


Public Types | |
| typedef std::map< ConstraintT, const Bound< T > * > | ConstraintBoundMap |
| A map from Constraint pointers to Bound pointers. More... | |
| typedef carl::FastMap< carl::Variable, Variable< T > * > | VariableMap |
| A hash-map from arithmetic variables to variables managing the bounds. More... | |
Public Member Functions | |
| VariableBounds () | |
| Constructs a variable bounds manager. More... | |
| ~VariableBounds () | |
| Destructs a variable bounds manager. More... | |
| void | clear () |
| bool | empty () const |
| bool | addBound (const ConstraintT &_constraint, const T &_origin) |
| Updates the variable bounds by the given constraint. More... | |
| bool | addBound (const FormulaT &_formula, const T &_origin) |
| unsigned | removeBound (const ConstraintT &_constraint, const T &_origin) |
| Removes all effects the given constraint has on the variable bounds. More... | |
| unsigned | removeBound (const FormulaT &_formula, const T &_origin) |
| unsigned | removeBound (const ConstraintT &_constraint, const T &_origin, carl::Variable *&_changedVariable) |
| Removes all effects the given constraint has on the variable bounds. More... | |
| const EvalRationalIntervalMap & | getEvalIntervalMap () const |
| Creates an evalintervalmap corresponding to the variable bounds. More... | |
| const RationalInterval & | getInterval (const carl::Variable &_var) const |
| Creates an interval corresponding to the variable bounds of the given variable. More... | |
| RationalInterval | getInterval (carl::Monomial::Arg _mon) const |
| Creates an interval corresponding to the bounds of the given monomial. More... | |
| RationalInterval | getInterval (const TermT &_term) const |
| Creates an interval corresponding to the bounds of the given term. More... | |
| const smtrat::EvalDoubleIntervalMap & | getIntervalMap () const |
| Creates an interval map corresponding to the variable bounds. More... | |
| const carl::Interval< double > & | getDoubleInterval (const carl::Variable &_var) const |
| Creates a double interval corresponding to the variable bounds of the given variable. More... | |
| std::vector< T > | getOriginsOfBounds (const carl::Variable &_var) const |
| std::set< T > | getOriginSetOfBounds (const carl::Variable &_var) const |
| std::vector< T > | getOriginsOfBounds (const carl::Variables &_variables) const |
| std::set< T > | getOriginSetOfBounds (const carl::Variables &_variables) const |
| std::vector< T > | getOriginsOfBounds () const |
| Collect the origins to the supremums and infimums of all variables. More... | |
| std::set< T > | getOriginSetOfBounds () const |
| std::vector< std::pair< std::vector< ConstraintT >, ConstraintT > > | getBoundDeductions () const |
| void | print (std::ostream &_out=std::cout, const std::string _init="", bool _printAllBounds=false) const |
| Prints the variable bounds. More... | |
| bool | isConflicting () const |
| std::set< T > | getConflict () const |
Private Attributes | |
| Variable< T > * | mpConflictingVariable |
| A pointer to one of the conflicting variables (its supremum is smaller than its infimum) or NULL if there is no conflict. More... | |
| VariableMap * | mpVariableMap |
| A mapping from arithmetic variables to the variable objects storing the bounds. More... | |
| ConstraintBoundMap * | mpConstraintBoundMap |
| A mapping from constraint pointer to the corresponding bounds. More... | |
| EvalRationalIntervalMap | mEvalIntervalMap |
| The stored exact interval map representing the currently tightest bounds. More... | |
| EvalDoubleIntervalMap | mDoubleIntervalMap |
| The stored double interval map representing the currently tightest bounds. More... | |
| ConstraintsT | mNonBoundConstraints |
| Stores the constraints which cannot be used to infer a bound for a variable. More... | |
| std::unordered_set< std::vector< ConstraintT > > | mBoundDeductions |
| Stores deductions which this variable bounds manager has detected. More... | |
Class to manage the bounds of a variable.
Definition at line 356 of file VariableBounds.h.
| typedef std::map<ConstraintT,const Bound<T>*> smtrat::vb::VariableBounds< T >::ConstraintBoundMap |
A map from Constraint pointers to Bound pointers.
Definition at line 360 of file VariableBounds.h.
| typedef carl::FastMap<carl::Variable, Variable<T>*> smtrat::vb::VariableBounds< T >::VariableMap |
A hash-map from arithmetic variables to variables managing the bounds.
Definition at line 362 of file VariableBounds.h.
| smtrat::vb::VariableBounds< T >::VariableBounds | ( | ) |
Constructs a variable bounds manager.
| smtrat::vb::VariableBounds< T >::~VariableBounds | ( | ) |
Destructs a variable bounds manager.
| bool smtrat::vb::VariableBounds< T >::addBound | ( | const ConstraintT & | _constraint, |
| const T & | _origin | ||
| ) |
Updates the variable bounds by the given constraint.
| _constraint | The constraint to consider. |
| _origin | The origin of the given constraint. |

| bool smtrat::vb::VariableBounds< T >::addBound | ( | const FormulaT & | _formula, |
| const T & | _origin | ||
| ) |
| void smtrat::vb::VariableBounds< T >::clear | ( | ) |

|
inline |
Definition at line 393 of file VariableBounds.h.
| std::vector<std::pair<std::vector<ConstraintT>, ConstraintT> > smtrat::vb::VariableBounds< T >::getBoundDeductions | ( | ) | const |
|
inline |
Definition at line 518 of file VariableBounds.h.

| const carl::Interval<double>& smtrat::vb::VariableBounds< T >::getDoubleInterval | ( | const carl::Variable & | _var | ) | const |
Creates a double interval corresponding to the variable bounds of the given variable.
| _var | The variable to compute the variable bounds as double interval for. |

| const EvalRationalIntervalMap& smtrat::vb::VariableBounds< T >::getEvalIntervalMap | ( | ) | const |
Creates an evalintervalmap corresponding to the variable bounds.

| RationalInterval smtrat::vb::VariableBounds< T >::getInterval | ( | carl::Monomial::Arg | _mon | ) | const |
Creates an interval corresponding to the bounds of the given monomial.
| _mon | The monomial to compute the bounds as interval for. |
| const RationalInterval& smtrat::vb::VariableBounds< T >::getInterval | ( | const carl::Variable & | _var | ) | const |
Creates an interval corresponding to the variable bounds of the given variable.
| _var | The variable to compute the variable bounds as interval for. |

| RationalInterval smtrat::vb::VariableBounds< T >::getInterval | ( | const TermT & | _term | ) | const |
Creates an interval corresponding to the bounds of the given term.
| _term | The term to compute the bounds as interval for. |
| const smtrat::EvalDoubleIntervalMap& smtrat::vb::VariableBounds< T >::getIntervalMap | ( | ) | const |
Creates an interval map corresponding to the variable bounds.

| std::set<T> smtrat::vb::VariableBounds< T >::getOriginSetOfBounds | ( | ) | const |
| std::set<T> smtrat::vb::VariableBounds< T >::getOriginSetOfBounds | ( | const carl::Variable & | _var | ) | const |
| std::set<T> smtrat::vb::VariableBounds< T >::getOriginSetOfBounds | ( | const carl::Variables & | _variables | ) | const |
| std::vector<T> smtrat::vb::VariableBounds< T >::getOriginsOfBounds | ( | ) | const |
Collect the origins to the supremums and infimums of all variables.
| std::vector<T> smtrat::vb::VariableBounds< T >::getOriginsOfBounds | ( | const carl::Variable & | _var | ) | const |
| _var | The variable to get origins of the bounds for. |

| std::vector<T> smtrat::vb::VariableBounds< T >::getOriginsOfBounds | ( | const carl::Variables & | _variables | ) | const |
| _variables | The variables to get origins of the bounds for. |
|
inline |
Definition at line 510 of file VariableBounds.h.

| void smtrat::vb::VariableBounds< T >::print | ( | std::ostream & | _out = std::cout, |
| const std::string | _init = "", |
||
| bool | _printAllBounds = false |
||
| ) | const |
Prints the variable bounds.
| _out | The output stream to print on. |
| _init | A string which is displayed at the beginning of every row. |
| _printAllBounds | A flag that indicates whether to print also the bounds of each variable (=true). |

| unsigned smtrat::vb::VariableBounds< T >::removeBound | ( | const ConstraintT & | _constraint, |
| const T & | _origin | ||
| ) |
Removes all effects the given constraint has on the variable bounds.
| _constraint | The constraint, which effects shall be undone for the variable bounds. |
| _origin | The origin of the given constraint. |

| unsigned smtrat::vb::VariableBounds< T >::removeBound | ( | const ConstraintT & | _constraint, |
| const T & | _origin, | ||
| carl::Variable *& | _changedVariable | ||
| ) |
Removes all effects the given constraint has on the variable bounds.
| _constraint | The constraint, which effects shall be undone for the variable bounds. |
| _origin | The origin of the given constraint. |
| _changedVariable | The variable whose interval domain has been changed, if the return value is 2. |
| unsigned smtrat::vb::VariableBounds< T >::removeBound | ( | const FormulaT & | _formula, |
| const T & | _origin | ||
| ) |
|
mutableprivate |
Stores deductions which this variable bounds manager has detected.
Definition at line 380 of file VariableBounds.h.
|
mutableprivate |
The stored double interval map representing the currently tightest bounds.
Note, that it is updated on demand.
Definition at line 376 of file VariableBounds.h.
|
mutableprivate |
The stored exact interval map representing the currently tightest bounds.
Note, that it is updated on demand.
Definition at line 373 of file VariableBounds.h.
|
private |
Stores the constraints which cannot be used to infer a bound for a variable.
Definition at line 378 of file VariableBounds.h.
|
private |
A pointer to one of the conflicting variables (its supremum is smaller than its infimum) or NULL if there is no conflict.
Definition at line 366 of file VariableBounds.h.
|
private |
A mapping from constraint pointer to the corresponding bounds.
Definition at line 370 of file VariableBounds.h.
|
private |
A mapping from arithmetic variables to the variable objects storing the bounds.
Definition at line 368 of file VariableBounds.h.