#include <vectorterm.hh>
Inheritance diagram for RVLAlg::NormGradientTerminator< Scalar >:
Public Types | |
typedef ScalarFieldTraits< Scalar >::AbsType | NormRetType |
Public Member Functions | |
NormGradientTerminator (Vector< Scalar > &x, Functional< Scalar > &f, NormRetType tol) | |
Takes the current x, the functional f, and the tolerance. | |
bool | query () |
Returns true when norm of the gradient is less than tol. | |
Protected Attributes | |
NormRetType | tol_ |
FunctionalEvaluation< Scalar > | fx_ |
Stops when
Note: For efficiency, we store and compare it to the square of the norm, since this is ussually cheaper.
Definition at line 313 of file vectorterm.hh.
typedef ScalarFieldTraits<Scalar>::AbsType RVLAlg::NormGradientTerminator< Scalar >::NormRetType |
Definition at line 315 of file vectorterm.hh.
RVLAlg::NormGradientTerminator< Scalar >::NormGradientTerminator | ( | Vector< Scalar > & | x, | |
Functional< Scalar > & | f, | |||
NormRetType | tol | |||
) |
Takes the current x, the functional f, and the tolerance.
Notice that all inputs except for the tolerance are references, and similar internal data members are also references. Thus, external changes to these objects will affect the terminator. This is the intended behavior.
Definition at line 324 of file vectorterm.hh.
bool RVLAlg::NormGradientTerminator< Scalar >::query | ( | ) | [virtual] |
Returns true when norm of the gradient is less than tol.
Implements RVLAlg::Terminator.
Definition at line 331 of file vectorterm.hh.
References RVLAlg::NormGradientTerminator< Scalar >::fx_, and RVLAlg::NormGradientTerminator< Scalar >::tol_.
NormRetType RVLAlg::NormGradientTerminator< Scalar >::tol_ [protected] |
Definition at line 336 of file vectorterm.hh.
Referenced by RVLAlg::NormGradientTerminator< Scalar >::query().
FunctionalEvaluation<Scalar> RVLAlg::NormGradientTerminator< Scalar >::fx_ [protected] |
Definition at line 337 of file vectorterm.hh.
Referenced by RVLAlg::NormGradientTerminator< Scalar >::query().