ROC++  v1.2
Automatic Robust Optimization in C++
uncContainer Class Reference

Uncertainty container. More...

#include <Uncertainty.hpp>

Public Types

typedef uncMapType::const_iterator const_iterator
 Constant iterator for decision variable map. More...
 

Public Member Functions

 uncContainer ()
 
 ~uncContainer ()
 
void operator+= (const uncContainer &a)
 Add uncertain parameters from uncertainty container a into this container. More...
 
void operator+= (const ROCPPUnc_Ptr &unc)
 Add uncertain parameter unc to this container. More...
 
const_iterator begin () const
 Return a constant iterator pointing to the beginning of the uncertain parameter map. More...
 
const_iterator end () const
 Return a constant iterator pointing to the end of the uncertain parameter map. More...
 
const_iterator find (string uncName) const
 Return a constant iterator pointing to the uncertain parameter called uncName. More...
 
const_iterator findInObs (string uncName) const
 Find the uncertain parameter called uncName in the map for observable uncertain parameters. More...
 
const_iterator findthrow (string uncName) const
 Find the uncertain parameter called uncName in this container. More...
 
size_t getNumUncertainties () const
 Get the number of uncertain parameters in this container. More...
 
size_t getNumObsUncertainties () const
 Get the number of observable uncertain parameters in this container. More...
 
uint getAlphabeticalLocation (string uncName) const
 Get the alphabetical location of this uncertain parameter in this container. More...
 
uint getObservableAlphabeticalLocation (string uncName) const
 Get the alphabetical location of this uncertain parameter in this container among the observable uncertain parameters. More...
 
bool isObservable (string uncName) const
 Return true if and only if the uncertain parameter is observable. More...
 
bool empty () const
 Return true if and only if this container is empty. More...
 

Private Attributes

uncMapType m_UncMap
 Map from uncertain parameter name to uncertain parameter. More...
 
uncMapType m_ObsUncMap
 Map from uncertain parameter name to observable uncertain parameter. More...
 

Detailed Description

Uncertainty container.

Used to store uncertain parameters for class ConstraintTermIF, LHSExpression, etc.

Member Typedef Documentation

◆ const_iterator

typedef uncMapType::const_iterator uncContainer::const_iterator

Constant iterator for decision variable map.

Constructor & Destructor Documentation

◆ uncContainer()

uncContainer::uncContainer ( )
inline

◆ ~uncContainer()

uncContainer::~uncContainer ( )
inline

Member Function Documentation

◆ begin()

const_iterator uncContainer::begin ( ) const
inline

Return a constant iterator pointing to the beginning of the uncertain parameter map.

◆ empty()

bool uncContainer::empty ( ) const
inline

Return true if and only if this container is empty.

◆ end()

const_iterator uncContainer::end ( ) const
inline

Return a constant iterator pointing to the end of the uncertain parameter map.

◆ find()

uncContainer::const_iterator uncContainer::find ( string  uncName) const

Return a constant iterator pointing to the uncertain parameter called uncName.

◆ findInObs()

uncContainer::const_iterator uncContainer::findInObs ( string  uncName) const

Find the uncertain parameter called uncName in the map for observable uncertain parameters.

◆ findthrow()

uncContainer::const_iterator uncContainer::findthrow ( string  uncName) const

Find the uncertain parameter called uncName in this container.

If there is no such uncertainty, an exception will be thrown.

◆ getAlphabeticalLocation()

uint uncContainer::getAlphabeticalLocation ( string  uncName) const

Get the alphabetical location of this uncertain parameter in this container.

◆ getNumObsUncertainties()

size_t uncContainer::getNumObsUncertainties ( ) const
inline

Get the number of observable uncertain parameters in this container.

◆ getNumUncertainties()

size_t uncContainer::getNumUncertainties ( ) const
inline

Get the number of uncertain parameters in this container.

◆ getObservableAlphabeticalLocation()

uint uncContainer::getObservableAlphabeticalLocation ( string  uncName) const

Get the alphabetical location of this uncertain parameter in this container among the observable uncertain parameters.

◆ isObservable()

bool uncContainer::isObservable ( string  uncName) const

Return true if and only if the uncertain parameter is observable.

◆ operator+=() [1/2]

void uncContainer::operator+= ( const ROCPPUnc_Ptr unc)

Add uncertain parameter unc to this container.

Note
If the uncertainty already exists, it will be ignored. If an uncertain parameter with the same name already exists in this container, an error will be thrown.

◆ operator+=() [2/2]

void uncContainer::operator+= ( const uncContainer a)

Add uncertain parameters from uncertainty container a into this container.

Note
Uncertain parameters that already exist will be ignored. If an uncertain parameter with the same name already exists in this container, an error will be thrown.

Member Data Documentation

◆ m_ObsUncMap

uncMapType uncContainer::m_ObsUncMap
private

Map from uncertain parameter name to observable uncertain parameter.

◆ m_UncMap

uncMapType uncContainer::m_UncMap
private

Map from uncertain parameter name to uncertain parameter.