QuantLib_EndCriteria man page

EndCriteria — Criteria to end optimization process:  

Synopsis

#include <ql/math/optimization/endcriteria.hpp>

Public Types

enum Type { None, MaxIterations, StationaryPoint, StationaryFunctionValue, StationaryFunctionAccuracy, ZeroGradientNorm, Unknown }

Public Member Functions

EndCriteria (Size maxIterations, Size maxStationaryStateIterations, Real rootEpsilon, Real functionEpsilon, Real gradientNormEpsilon)
Initialization constructor.
Size maxIterations () const
Size maxStationaryStateIterations () const
Real rootEpsilon () const
Real functionEpsilon () const
Real gradientNormEpsilon () const
bool operator() (const Size iteration, Size &statState, const bool positiveOptimization, const Real fold, const Real normgold, const Real fnew, const Real normgnew, EndCriteria::Type &ecType) const
bool checkMaxIterations (const Size iteration, EndCriteria::Type &ecType) const
bool checkStationaryPoint (const Real xOld, const Real xNew, Size &statStateIterations, EndCriteria::Type &ecType) const
bool checkStationaryFunctionValue (const Real fxOld, const Real fxNew, Size &statStateIterations, EndCriteria::Type &ecType) const
bool checkStationaryFunctionAccuracy (const Real f, const bool positiveOptimization, EndCriteria::Type &ecType) const
bool checkZeroGradientNorm (const Real gNorm, EndCriteria::Type &ecType) const

Protected Attributes

Size maxIterations_
Maximum number of iterations.
Size maxStationaryStateIterations_
Maximun number of iterations in stationary state.
Real rootEpsilon_
root, function and gradient epsilons
Real functionEpsilon_
Real gradientNormEpsilon_

Detailed Description

Criteria to end optimization process:

Examples: BermudanSwaption.cpp.

Member Function Documentation

bool operator() (const Size iteration, Size & statState, const bool positiveOptimization, const Real fold, const Real normgold, const Real fnew, const Real 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 iteration, EndCriteria::Type & ecType) const

Test if the number of iteration is below MaxIterations

bool checkStationaryPoint (const Real xOld, const Real xNew, Size & statStateIterations, EndCriteria::Type & ecType) const

Test if the root variation is below rootEpsilon

bool checkStationaryFunctionValue (const Real fxOld, const Real fxNew, Size & statStateIterations, EndCriteria::Type & ecType) const

Test if the function variation is below functionEpsilon

bool checkStationaryFunctionAccuracy (const Real f, const bool positiveOptimization, EndCriteria::Type & ecType) const

Test if the function value is below functionEpsilon

bool checkZeroGradientNorm (const Real gNorm, EndCriteria::Type & ecType) const

Test if the gradient norm variation is below gradientNormEpsilon

Test if the gradient norm value is below gradientNormEpsilon

Author

Generated automatically by Doxygen for QuantLib from the source code.

Referenced By

checkMaxIterations(3), checkStationaryFunctionAccuracy(3), checkStationaryFunctionValue(3), checkStationaryPoint(3), checkZeroGradientNorm(3), EndCriteria(3), functionEpsilon(3), functionEpsilon_(3), gradientNormEpsilon(3), gradientNormEpsilon_(3), maxIterations_(3), maxStationaryStateIterations(3), maxStationaryStateIterations_(3), rootEpsilon(3) and rootEpsilon_(3) are aliases of QuantLib_EndCriteria(3).

Fri Feb 10 2017 Version 1.9.1 QuantLib