GQCP
|
#include <IterativeAlgorithm.hpp>
Public Types | |
using | Environment = _Environment |
Public Member Functions | |
template<typename Criterion > | |
IterativeAlgorithm (const StepCollection< Environment > &steps, const Criterion &convergence_criterion, const size_t maximum_number_of_iterations=128) | |
std::string | description () const |
template<typename Z = Step<Environment>> | |
enable_if_t< std::is_same< Environment, typename Z::Environment >::value, void > | insert (const Z &step, const size_t index) |
size_t | maximumNumberOfIterations () const |
size_t | numberOfIterations () const |
void | perform (Environment &environment) |
void | remove (const size_t index) |
template<typename Z = Step<Environment>> | |
enable_if_t< std::is_same< Environment, typename Z::Environment >::value, void > | replace (const Z &step, const size_t index) |
An algorithm that performs iterations. In every iteration, convergence is checked and a set of iteration steps is performed.
_Environment | the type of environment that this algorithm is associated to |
using GQCP::IterativeAlgorithm< _Environment >::Environment = _Environment |
|
inline |
Initialize the members of the iterative algorithm
Criterion | the type of the convergence criterion that is used |
steps | the collection of algorithm steps that is performed in-between convergence checks |
convergence_criterion | the convergence criterion that must be fulfilled in order for the algorithm to have converged |
maximum_number_of_iterations | the maximum number of iterations the algorithm may perform |
|
inline |
|
inline |
Insert an algorithm step at the given index.
step | the step that should be inserted into this algorithm |
index | the zero-based index that the given step should be performed at in this algorithm |
|
inline |
|
inline |
|
inline |
Perform the iteration steps until convergence is achieved
environment | the environment that this algorithm is associated to |
|
inline |
Remove the algorithm step at the given index.
index | the zero-based index of the step in this algorithm that should be removed |
|
inline |
Replace an algorithm step at the given index.
step | the step that should be inserted into this algorithm |
index | the zero-based index of the step that should be replaced |