SMT-RAT  24.02
Toolbox for Strategic and Parallel Satisfiability-Modulo-Theories Solving
smtrat::vb::Variable< T > Class Template Reference

Class for a variable. More...

#include <VariableBounds.h>

Collaboration diagram for smtrat::vb::Variable< T >:

Data Structures

struct  boundPointerComp
 Compares two pointers showing to bounds. More...
 

Public Member Functions

 Variable ()
 Constructs this variable. More...
 
 ~Variable ()
 
bool conflicting () const
 
const Bound< T > * addBound (const ConstraintT &_constraint, const carl::Variable &_var, const T &_origin)
 Adds the bound corresponding to the constraint to the given variable. More...
 
bool updateBounds (const Bound< T > &_changedBound)
 Updates the infimum and supremum of this variable. More...
 
bool updatedExactInterval () const
 
void exactIntervalHasBeenUpdated () const
 Sets the flag indicating that the stored exact interval representing the variable's bounds is up to date to false. More...
 
bool updatedDoubleInterval () const
 
void doubleIntervalHasBeenUpdated () const
 Sets the flag indicating that the stored double interval representing the variable's bounds is up to date to false. More...
 
const Bound< T > * pSupremum () const
 
const Bound< T > & supremum () const
 
const Bound< T > * pInfimum () const
 
const Bound< T > & infimum () const
 
const BoundSetupperbounds () const
 
const BoundSetlowerbounds () const
 

Private Types

typedef std::set< const Bound< T > *, boundPointerCompBoundSet
 A set of bounds. More...
 

Private Attributes

bool mUpdatedExactInterval
 A flag that indicates that the stored exact interval of this variable is up to date. More...
 
bool mUpdatedDoubleInterval
 A flag that indicates that the stored double interval of this variable is up to date. More...
 
const Bound< T > * mpSupremum
 The least upper bound of this variable. More...
 
const Bound< T > * mpInfimum
 The greatest lower bound of this variable. More...
 
BoundSet mUpperbounds
 The set of all upper bounds of this variable. More...
 
BoundSet mLowerbounds
 The set of all lower bounds of this variable. More...
 

Detailed Description

template<typename T>
class smtrat::vb::Variable< T >

Class for a variable.

Definition at line 198 of file VariableBounds.h.

Member Typedef Documentation

◆ BoundSet

template<typename T >
typedef std::set<const Bound<T>*, boundPointerComp> smtrat::vb::Variable< T >::BoundSet
private

A set of bounds.

Definition at line 217 of file VariableBounds.h.

Constructor & Destructor Documentation

◆ Variable()

template<typename T >
smtrat::vb::Variable< T >::Variable ( )

Constructs this variable.

◆ ~Variable()

template<typename T >
smtrat::vb::Variable< T >::~Variable ( )

Member Function Documentation

◆ addBound()

template<typename T >
const Bound<T>* smtrat::vb::Variable< T >::addBound ( const ConstraintT _constraint,
const carl::Variable< T > &  _var,
const T &  _origin 
)

Adds the bound corresponding to the constraint to the given variable.

The constraint is expected to contain only one variable and this one only linearly.

Parameters
_constraintA pointer to a constraint of the form ax~b.
_varHence, the variable x.
_originThe origin of the constraint. This is could be the constraint itself or anything else in the data structure which uses this object.
_limit
Returns
The added bound.

◆ conflicting()

template<typename T >
bool smtrat::vb::Variable< T >::conflicting ( ) const
Returns
true, if there is a conflict; false, otherwise.

◆ doubleIntervalHasBeenUpdated()

template<typename T >
void smtrat::vb::Variable< T >::doubleIntervalHasBeenUpdated ( ) const
inline

Sets the flag indicating that the stored double interval representing the variable's bounds is up to date to false.

Definition at line 299 of file VariableBounds.h.

◆ exactIntervalHasBeenUpdated()

template<typename T >
void smtrat::vb::Variable< T >::exactIntervalHasBeenUpdated ( ) const
inline

Sets the flag indicating that the stored exact interval representing the variable's bounds is up to date to false.

Definition at line 282 of file VariableBounds.h.

◆ infimum()

template<typename T >
const Bound<T>& smtrat::vb::Variable< T >::infimum ( ) const
inline
Returns
A constant reference to the infimum of this variable.

Definition at line 331 of file VariableBounds.h.

◆ lowerbounds()

template<typename T >
const BoundSet& smtrat::vb::Variable< T >::lowerbounds ( ) const
inline
Returns
A constant reference to the set of lower bounds of this variable.

Definition at line 347 of file VariableBounds.h.

◆ pInfimum()

template<typename T >
const Bound<T>* smtrat::vb::Variable< T >::pInfimum ( ) const
inline
Returns
A pointer to the infimum of this variable.

Definition at line 323 of file VariableBounds.h.

◆ pSupremum()

template<typename T >
const Bound<T>* smtrat::vb::Variable< T >::pSupremum ( ) const
inline
Returns
A pointer to the supremum of this variable.

Definition at line 307 of file VariableBounds.h.

◆ supremum()

template<typename T >
const Bound<T>& smtrat::vb::Variable< T >::supremum ( ) const
inline
Returns
A constant reference to the supremum of this variable.

Definition at line 315 of file VariableBounds.h.

◆ updateBounds()

template<typename T >
bool smtrat::vb::Variable< T >::updateBounds ( const Bound< T > &  _changedBound)

Updates the infimum and supremum of this variable.

Parameters
_changedBoundThe bound, for which we certainly know that it got deactivated before.
Returns
true, if there is a conflict; false, otherwise.

◆ updatedDoubleInterval()

template<typename T >
bool smtrat::vb::Variable< T >::updatedDoubleInterval ( ) const
inline
Returns
true, if the stored double interval representing the variable's bounds is up to date. false, otherwise

Definition at line 291 of file VariableBounds.h.

◆ updatedExactInterval()

template<typename T >
bool smtrat::vb::Variable< T >::updatedExactInterval ( ) const
inline
Returns
true, if the stored exact interval representing the variable's bounds is up to date. false, otherwise

Definition at line 274 of file VariableBounds.h.

◆ upperbounds()

template<typename T >
const BoundSet& smtrat::vb::Variable< T >::upperbounds ( ) const
inline
Returns
A constant reference to the set of upper bounds of this variable.

Definition at line 339 of file VariableBounds.h.

Field Documentation

◆ mLowerbounds

template<typename T >
BoundSet smtrat::vb::Variable< T >::mLowerbounds
private

The set of all lower bounds of this variable.

Definition at line 231 of file VariableBounds.h.

◆ mpInfimum

template<typename T >
const Bound<T>* smtrat::vb::Variable< T >::mpInfimum
private

The greatest lower bound of this variable.

Definition at line 227 of file VariableBounds.h.

◆ mpSupremum

template<typename T >
const Bound<T>* smtrat::vb::Variable< T >::mpSupremum
private

The least upper bound of this variable.

Definition at line 225 of file VariableBounds.h.

◆ mUpdatedDoubleInterval

template<typename T >
bool smtrat::vb::Variable< T >::mUpdatedDoubleInterval
mutableprivate

A flag that indicates that the stored double interval of this variable is up to date.

Definition at line 223 of file VariableBounds.h.

◆ mUpdatedExactInterval

template<typename T >
bool smtrat::vb::Variable< T >::mUpdatedExactInterval
mutableprivate

A flag that indicates that the stored exact interval of this variable is up to date.

Definition at line 221 of file VariableBounds.h.

◆ mUpperbounds

template<typename T >
BoundSet smtrat::vb::Variable< T >::mUpperbounds
private

The set of all upper bounds of this variable.

Definition at line 229 of file VariableBounds.h.


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