IterationPack Namespace Reference


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
  More...
class  AlgorithmStepTesting
 Testing class. More...
class  AlgorithmTrackTesting
 Testing class. More...
class  MinorLoop1Step
class  ControledLoop1Step
class  RuntimeConfigChangeStep

Namespaces

namespace  TestingPack

Enumerations

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

Functions

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)
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.
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.
template<class T>
const IterQuantityAccess<
T > & 
cast_iq (const AlgorithmState &state, const AlgorithmState::iq_id_type iq_id, const std::string &iq_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.


Enumeration Type Documentation

enum IterationPack::EAssocStepType

Enumerator:
PRE_STEP 
POST_STEP 

Definition at line 42 of file IterationPack_Types.hpp.

enum IterationPack::EDoStepType

Enumerator:
DO_MAIN_STEP 
DO_PRE_STEP 
DO_POST_STEP 

Definition at line 47 of file IterationPack_Types.hpp.

enum IterationPack::EAlgoReturn

Enumerator:
TERMINATE_TRUE 
TERMINATE_FALSE 
MAX_ITER_EXCEEDED 
MAX_RUN_TIME_EXCEEDED 
INTERRUPTED_TERMINATE_TRUE 
INTERRUPTED_TERMINATE_FALSE 

Definition at line 53 of file IterationPack_Types.hpp.


Function Documentation

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 32 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 45 of file IterationPack_cast_iq.cpp.

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 106 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 121 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 136 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 151 of file IterationPack_cast_iq.hpp.

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 33 of file IterationPack_print_algorithm_step.cpp.


Generated on Wed May 12 21:57:17 2010 for MOOCHO (Single Doxygen Collection) by  doxygen 1.4.7