| OpenMD 3.1
    Molecular Dynamics in the Open | 
Criteria to end optimization process: More...
#include <EndCriteria.hpp>
| Public Types | |
| enum | Type { None , MaxIterations , StationaryPoint , StationaryFunctionValue , StationaryFunctionAccuracy , ZeroGradientNorm , Unknown } | 
| Public Member Functions | |
| EndCriteria (size_t maxIterations, size_t maxStationaryStateIterations, RealType rootEpsilon, RealType functionEpsilon, RealType gradientNormEpsilon) | |
| Initialization constructor. | |
| size_t | maxIterations () const | 
| size_t | maxStationaryStateIterations () const | 
| RealType | rootEpsilon () const | 
| RealType | functionEpsilon () const | 
| RealType | gradientNormEpsilon () const | 
| bool | operator() (const size_t iteration, size_t &statState, const bool positiveOptimization, const RealType fold, const RealType normgold, const RealType fnew, const RealType normgnew, EndCriteria::Type &ecType) const | 
| Test if the number of iterations is not too big and if a minimum point is not reached. | |
| bool | checkMaxIterations (const size_t iteration, EndCriteria::Type &ecType) const | 
| Test if the number of iteration is below MaxIterations. | |
| bool | checkStationaryPoint (const RealType xOld, const RealType xNew, size_t &statStateIterations, EndCriteria::Type &ecType) const | 
| Test if the root variation is below rootEpsilon. | |
| bool | checkStationaryFunctionValue (const RealType fxOld, const RealType fxNew, size_t &statStateIterations, EndCriteria::Type &ecType) const | 
| Test if the function variation is below functionEpsilon. | |
| bool | checkStationaryFunctionAccuracy (const RealType f, const bool positiveOptimization, EndCriteria::Type &ecType) const | 
| Test if the function value is below functionEpsilon. | |
| bool | checkZeroGradientNorm (const RealType gNorm, EndCriteria::Type &ecType) const | 
| Test if the gradient norm value is below gradientNormEpsilon. | |
| Protected Attributes | |
| size_t | maxIterations_ | 
| Maximum number of iterations. | |
| size_t | maxStationaryStateIterations_ | 
| Maximun number of iterations in stationary state. | |
| RealType | rootEpsilon_ | 
| root, function and gradient epsilons | |
| RealType | functionEpsilon_ | 
| RealType | gradientNormEpsilon_ | 
Criteria to end optimization process:
Definition at line 42 of file EndCriteria.hpp.
| enum QuantLib::EndCriteria::Type | 
Definition at line 44 of file EndCriteria.hpp.
| QuantLib::EndCriteria::EndCriteria | ( | size_t | maxIterations, | 
| size_t | maxStationaryStateIterations, | ||
| RealType | rootEpsilon, | ||
| RealType | functionEpsilon, | ||
| RealType | gradientNormEpsilon ) | 
Initialization constructor.
Definition at line 31 of file EndCriteria.cpp.
References maxIterations_, and maxStationaryStateIterations_.
| bool QuantLib::EndCriteria::checkMaxIterations | ( | const size_t | iteration, | 
| EndCriteria::Type & | ecType ) const | 
Test if the number of iteration is below MaxIterations.
Definition at line 61 of file EndCriteria.cpp.
References maxIterations_.
Referenced by QuantLib::ArmijoLineSearch::operator()(), and operator()().
| bool QuantLib::EndCriteria::checkStationaryFunctionAccuracy | ( | const RealType | f, | 
| const bool | positiveOptimization, | ||
| EndCriteria::Type & | ecType ) const | 
Test if the function value is below functionEpsilon.
Definition at line 95 of file EndCriteria.cpp.
Referenced by operator()().
| bool QuantLib::EndCriteria::checkStationaryFunctionValue | ( | const RealType | fxOld, | 
| const RealType | fxNew, | ||
| size_t & | statStateIterations, | ||
| EndCriteria::Type & | ecType ) const | 
Test if the function variation is below functionEpsilon.
Definition at line 82 of file EndCriteria.cpp.
References maxStationaryStateIterations_.
Referenced by operator()().
| bool QuantLib::EndCriteria::checkStationaryPoint | ( | const RealType | xOld, | 
| const RealType | xNew, | ||
| size_t & | statStateIterations, | ||
| EndCriteria::Type & | ecType ) const | 
Test if the root variation is below rootEpsilon.
Definition at line 68 of file EndCriteria.cpp.
References maxStationaryStateIterations_, and rootEpsilon_.
| bool QuantLib::EndCriteria::checkZeroGradientNorm | ( | const RealType | gNorm, | 
| EndCriteria::Type & | ecType ) const | 
Test if the gradient norm value is below gradientNormEpsilon.
Definition at line 114 of file EndCriteria.cpp.
Referenced by operator()().
| RealType QuantLib::EndCriteria::functionEpsilon | ( | ) | const | 
Definition at line 145 of file EndCriteria.cpp.
| RealType QuantLib::EndCriteria::gradientNormEpsilon | ( | ) | const | 
Definition at line 147 of file EndCriteria.cpp.
| size_t QuantLib::EndCriteria::maxIterations | ( | ) | const | 
Definition at line 137 of file EndCriteria.cpp.
| size_t QuantLib::EndCriteria::maxStationaryStateIterations | ( | ) | const | 
Definition at line 139 of file EndCriteria.cpp.
| bool QuantLib::EndCriteria::operator() | ( | const size_t | iteration, | 
| size_t & | statState, | ||
| const bool | positiveOptimization, | ||
| const RealType | fold, | ||
| const RealType | normgold, | ||
| const RealType | fnew, | ||
| const RealType | normgnew, | ||
| EndCriteria::Type & | ecType ) const | 
Test if the number of iterations is not too big and if a minimum point is not reached.
Definition at line 121 of file EndCriteria.cpp.
References checkMaxIterations(), checkStationaryFunctionAccuracy(), checkStationaryFunctionValue(), and checkZeroGradientNorm().
| RealType QuantLib::EndCriteria::rootEpsilon | ( | ) | const | 
Definition at line 143 of file EndCriteria.cpp.
| 
 | protected | 
Definition at line 99 of file EndCriteria.hpp.
| 
 | protected | 
Definition at line 99 of file EndCriteria.hpp.
| 
 | protected | 
Maximum number of iterations.
Definition at line 95 of file EndCriteria.hpp.
Referenced by checkMaxIterations(), and EndCriteria().
| 
 | mutableprotected | 
Maximun number of iterations in stationary state.
Definition at line 97 of file EndCriteria.hpp.
Referenced by checkStationaryFunctionValue(), checkStationaryPoint(), and EndCriteria().
| 
 | protected | 
root, function and gradient epsilons
Definition at line 99 of file EndCriteria.hpp.
Referenced by checkStationaryPoint().