IterationPack: General framework for building iterative algorithms  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Types | List of all members
IterationPack::AlgorithmStep Class Referenceabstract

Base type for all objects that perform steps in an Algorithm. More...

#include <IterationPack_AlgorithmStep.hpp>

Public Types

typedef size_t poss_type
 

Pure virtual functions that must be overridden

virtual bool do_step (Algorithm &algo, poss_type step_poss, EDoStepType type, poss_type assoc_step_poss)=0
 Called by Algorithm to perform a main, pre or post step at step_poss and assoc_step_poss. More...
 

Virtual functions with default implementations

virtual ~AlgorithmStep ()
 
virtual void initialize_step (Algorithm &algo, poss_type step_poss, EDoStepType type, poss_type assoc_step_poss)
 Called by Algorithm just before the algorithm is run. More...
 
virtual void inform_updated (Algorithm &algo, poss_type step_poss, EDoStepType type, poss_type assoc_step_poss)
 Called by Algorithm to inform when a runtime configuration change is finihed. More...
 
virtual void finalize_step (Algorithm &algo, poss_type step_poss, EDoStepType type, poss_type assoc_step_poss)
 Called by Algorithm just after an algorithm is terminiated. More...
 
virtual void print_step (const Algorithm &algo, poss_type step_poss, EDoStepType type, poss_type assoc_step_poss, std::ostream &out, const std::string &leading_str) const
 Called by Algorithm::print_algorithm() to print out what this step does in Matlab like format. More...
 

Detailed Description

Base type for all objects that perform steps in an Algorithm.

Definition at line 53 of file IterationPack_AlgorithmStep.hpp.

Member Typedef Documentation

Definition at line 57 of file IterationPack_AlgorithmStep.hpp.

Constructor & Destructor Documentation

virtual IterationPack::AlgorithmStep::~AlgorithmStep ( )
inlinevirtual

Definition at line 82 of file IterationPack_AlgorithmStep.hpp.

Member Function Documentation

virtual bool IterationPack::AlgorithmStep::do_step ( Algorithm algo,
poss_type  step_poss,
EDoStepType  type,
poss_type  assoc_step_poss 
)
pure virtual

Called by Algorithm to perform a main, pre or post step at step_poss and assoc_step_poss.

Returns
Should return false if this step object has terminated the algorithm or redirected control to another step. In this case it is assumed that this called algo.terminate(...) or algo.do_step_next(...).
virtual void IterationPack::AlgorithmStep::initialize_step ( Algorithm algo,
poss_type  step_poss,
EDoStepType  type,
poss_type  assoc_step_poss 
)
inlinevirtual

Called by Algorithm just before the algorithm is run.

This allows step objects to reinitialize themselves just before an algorithm is run.

The default implementation does nothing.

Definition at line 91 of file IterationPack_AlgorithmStep.hpp.

virtual void IterationPack::AlgorithmStep::inform_updated ( Algorithm algo,
poss_type  step_poss,
EDoStepType  type,
poss_type  assoc_step_poss 
)
inlinevirtual

Called by Algorithm to inform when a runtime configuration change is finihed.

This function is only called when the algorithm is already running but the configuration has changed.

The default implementation does nothing.

Definition at line 107 of file IterationPack_AlgorithmStep.hpp.

virtual void IterationPack::AlgorithmStep::finalize_step ( Algorithm algo,
poss_type  step_poss,
EDoStepType  type,
poss_type  assoc_step_poss 
)
inlinevirtual

Called by Algorithm just after an algorithm is terminiated.

This allows step objects to perform any final processing or cleanup just after an algorithm is finished.

The default implementation does nothing.

Definition at line 122 of file IterationPack_AlgorithmStep.hpp.

virtual void IterationPack::AlgorithmStep::print_step ( const Algorithm algo,
poss_type  step_poss,
EDoStepType  type,
poss_type  assoc_step_poss,
std::ostream &  out,
const std::string &  leading_str 
) const
inlinevirtual

Called by Algorithm::print_algorithm() to print out what this step does in Matlab like format.

The default does nothing.

Definition at line 134 of file IterationPack_AlgorithmStep.hpp.


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