MOOCHO (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Namespaces | Classes | Enumerations | Functions
IterationPack Namespace Reference

Namespaces

 TestingPack
 

Classes

class  Algorithm
 Acts as the central hub for an iterative algorithm. More...
 
class  AlgorithmSetOptions
 Set options for Algorithm from an OptionsFromStream object. More...
 
class  AlgorithmState
 Abstacts a set of iteration quantities for an iterative algorithm. More...
 
class  AlgorithmStep
 Base type for all objects that perform steps in an Algorithm. More...
 
class  AlgorithmTracker
 Used to ouput iteration results and other information. More...
 
class  AlgorithmTrackerComposite
 This class acts a composite container for other AlgorithmTracker objects. More...
 
class  CastIQMemberBase
 Base class for some of the implementation features of CastIQMember. More...
 
class  CastIQMember
 Template class to be used to lookup an interation quantity, cast it to an IterQuantityAccess<T> object and cache the iq_id for fast access later. More...
 
class  IterQuantity
 Iterface for information about Iteration Quantities. More...
 
class  IterQuantityAccess
 Interface to typed iteration quantities. More...
 
class  IterQuantityAccessContiguous
 Iteration Quanities subclass for contiguous iterations. More...
 
class  InvalidTypeCastException
 
class  IterQuantityAccessDerivedToBase
 
class  AlgorithmStepTesting
 Testing class. More...
 
class  AlgorithmTrackTesting
 Testing class. More...
 
class  MinorLoop1Step
 
class  ControledLoop1Step
 
class  RuntimeConfigChangeStep
 

Enumerations

enum  EAssocStepType { PRE_STEP = 0, POST_STEP = 1 }
 
enum  EDoStepType { DO_MAIN_STEP = 0, DO_PRE_STEP = 1, DO_POST_STEP = 2 }
 
enum  EAlgoReturn {
  TERMINATE_TRUE, TERMINATE_FALSE, MAX_ITER_EXCEEDED, MAX_RUN_TIME_EXCEEDED,
  INTERRUPTED_TERMINATE_TRUE, INTERRUPTED_TERMINATE_FALSE
}
 

Functions

template<class T >
IterQuantityAccess< T > & cast_iq (AlgorithmState &state, const std::string &iq_name)
 Lookup an iteration quantity by name and cast it to an IterQuantityAccess<T> of the given type T. If the iteration quantity of that name does not exist then a AlgorithmState::DoesNotExist exception will be thrown. If the type of the iteration quantity is not of the type IterQuantityAcess<T> (as determined by dynamic_cast<T>) then the exception InvalidTypeCastException: will be thrown with a helpful error message. More...
 
template<class T >
const IterQuantityAccess< T > & cast_iq (const AlgorithmState &state, const std::string &iq_name)
 
template<class T >
IterQuantityAccess< T > & cast_iq (AlgorithmState &state, const AlgorithmState::iq_id_type iq_id, const std::string &iq_name)
 Lookup an iteration quantity using its id and cast it to an IterQuantityAccess<T> of the given type T. More...
 
template<class T >
const IterQuantityAccess< T > & cast_iq (const AlgorithmState &state, const AlgorithmState::iq_id_type iq_id, const std::string &iq_name)
 
void imp_cast_iq_throw_error (const std::string &iq_name, const std::string &iq_is_type_name, const std::string &iq_want_type_name)
 
void imp_cast_iq_throw_error (const AlgorithmState::iq_id_type iq_id, const std::string &iq_name, const std::string &iq_is_type_name, const std::string &iq_want_type_name)
 
void print_algorithm_step (const Algorithm &algo, Algorithm::poss_type step_poss, EDoStepType type, Algorithm::poss_type assoc_step_poss, std::ostream &out)
 Prints to 'out' the algorithm step. More...
 

Enumeration Type Documentation

Enumerator
PRE_STEP 
POST_STEP 

Definition at line 55 of file IterationPack_Types.hpp.

Enumerator
DO_MAIN_STEP 
DO_PRE_STEP 
DO_POST_STEP 

Definition at line 60 of file IterationPack_Types.hpp.

Enumerator
TERMINATE_TRUE 
TERMINATE_FALSE 
MAX_ITER_EXCEEDED 
MAX_RUN_TIME_EXCEEDED 
INTERRUPTED_TERMINATE_TRUE 
INTERRUPTED_TERMINATE_FALSE 

Definition at line 66 of file IterationPack_Types.hpp.

Function Documentation

template<class T >
IterQuantityAccess< T > & IterationPack::cast_iq ( AlgorithmState &  state,
const std::string &  iq_name 
)

Lookup an iteration quantity by name and cast it to an IterQuantityAccess<T> of the given type T. If the iteration quantity of that name does not exist then a AlgorithmState::DoesNotExist exception will be thrown. If the type of the iteration quantity is not of the type IterQuantityAcess<T> (as determined by dynamic_cast<T>) then the exception InvalidTypeCastException: will be thrown with a helpful error message.

Note that using this function always cost O(s.num_iter_quantities()) everytime it is called. Therefore, the developer should consider using the class CastIQMember instead if it is appropriate.

Definition at line 119 of file IterationPack_cast_iq.hpp.

template<class T >
const IterQuantityAccess< T > & IterationPack::cast_iq ( const AlgorithmState &  state,
const std::string &  iq_name 
)

Definition at line 134 of file IterationPack_cast_iq.hpp.

template<class T >
IterQuantityAccess< T > & IterationPack::cast_iq ( AlgorithmState &  state,
const AlgorithmState::iq_id_type  iq_id,
const std::string &  iq_name 
)

Lookup an iteration quantity using its id and cast it to an IterQuantityAccess<T> of the given type T.

Parameters
state[in]

If the iteration quantity with that id does not exist then a AlgorithmState::DoesNotExist exception will be thrown. If the type of the iteration quantity is not of the type IterQuantityAcess<T> (as determined by dynamic_cast<T>) then the exception InvalidTypeCastException: will be thrown with a helpful error message.

Note that using this function always cost just O(1) everytime it is called.

Definition at line 149 of file IterationPack_cast_iq.hpp.

template<class T >
const IterQuantityAccess< T > & IterationPack::cast_iq ( const AlgorithmState &  state,
const AlgorithmState::iq_id_type  iq_id,
const std::string &  iq_name 
)

Definition at line 164 of file IterationPack_cast_iq.hpp.

void IterationPack::imp_cast_iq_throw_error ( const std::string &  iq_name,
const std::string &  iq_is_type_name,
const std::string &  iq_want_type_name 
)

Definition at line 45 of file IterationPack_cast_iq.cpp.

void IterationPack::imp_cast_iq_throw_error ( const AlgorithmState::iq_id_type  iq_id,
const std::string &  iq_name,
const std::string &  iq_is_type_name,
const std::string &  iq_want_type_name 
)

Definition at line 58 of file IterationPack_cast_iq.cpp.

void IterationPack::print_algorithm_step ( const Algorithm &  algo,
Algorithm::poss_type  step_poss,
EDoStepType  type,
Algorithm::poss_type  assoc_step_poss,
std::ostream &  out 
)

Prints to 'out' the algorithm step.

This function can be used by AlgorithmStep subclasses in their AlgorithmStep::print_step() methods to print the header for the algorithm step. This will print the number of the step in the algorithm, its name, and the name of its concreate subclass.

Definition at line 46 of file IterationPack_print_algorithm_step.cpp.