#include <itkMoreThuenteLineSearchOptimizer.h>
ITK version of the MoreThuente line search algorithm.
This class is an ITK version of the netlib function mcsrch_. It gives exactly the same results.
The purpose of this optimizer is to find a step which satisfies a sufficient decrease condition and a curvature condition.
At each stage the subroutine updates an interval of uncertainty with endpoints stx and sty. The interval of uncertainty is initially chosen so that it contains a minimizer of the modified function
If a step is obtained for which the modified function has a nonpositive function value and nonnegative derivative, then the interval of uncertainty is chosen so that it contains a minimizer of .
The algorithm is designed to find a step which satisfies the sufficient decrease condition
and the curvature condition
(together also called the Strong Wolfe Conditions)
if the ValueTolerance is less than the GradientTolerance and if, for example, the function is bounded below, then there is always a step which satisfies both conditions. If no step can be found which satisfies both conditions, then the algorithm usually stops when rounding errors prevent further progress. In this case stp only satisfies the sufficient decrease condition.
Definition at line 71 of file itkMoreThuenteLineSearchOptimizer.h.
Public Types | |
using | ConstPointer = SmartPointer<const Self> |
using | Pointer = SmartPointer<Self> |
using | Self = MoreThuenteLineSearchOptimizer |
enum | StopConditionType { StrongWolfeConditionsSatisfied , MetricError , MaximumNumberOfIterations , StepTooSmall , StepTooLarge , IntervalTooSmall , RoundingError , AscentSearchDirection , Unknown } |
using | Superclass = LineSearchOptimizer |
Public Types inherited from itk::LineSearchOptimizer | |
using | ConstPointer = SmartPointer<const Self> |
using | Pointer = SmartPointer<Self> |
using | Self = LineSearchOptimizer |
using | Superclass = SingleValuedNonLinearOptimizer |
Public Member Functions | |
virtual const char * | GetClassName () const |
void | GetCurrentDerivative (DerivativeType &derivative) const override |
virtual double | GetCurrentDirectionalDerivative () const |
virtual unsigned long | GetCurrentIteration () const |
MeasureType | GetCurrentValue () const override |
void | GetCurrentValueAndDerivative (MeasureType &value, DerivativeType &derivative) const override |
virtual bool | GetCurvatureConditionSatisfied () const |
virtual double | GetGradientTolerance () const |
virtual double | GetIntervalTolerance () const |
virtual unsigned long | GetMaximumNumberOfIterations () const |
virtual const StopConditionType & | GetStopCondition () |
virtual bool | GetSufficientDecreaseConditionSatisfied () const |
virtual double | GetValueTolerance () const |
ITK_DISALLOW_COPY_AND_MOVE (MoreThuenteLineSearchOptimizer) | |
virtual void | SetGradientTolerance (double _arg) |
void | SetInitialDerivative (const DerivativeType &derivative) override |
void | SetInitialValue (MeasureType value) override |
virtual void | SetIntervalTolerance (double _arg) |
virtual void | SetMaximumNumberOfIterations (unsigned long _arg) |
virtual void | SetValueTolerance (double _arg) |
void | StartOptimization () override |
virtual void | StopOptimization () |
Public Member Functions inherited from itk::LineSearchOptimizer | |
virtual double | GetCurrentStepLength () const |
virtual double | GetInitialStepLengthEstimate () const |
virtual const ParametersType & | GetLineSearchDirection () |
virtual double | GetMaximumStepLength () const |
virtual double | GetMinimumStepLength () const |
ITK_DISALLOW_COPY_AND_MOVE (LineSearchOptimizer) | |
virtual void | SetInitialStepLengthEstimate (double _arg) |
virtual void | SetLineSearchDirection (const ParametersType &arg) |
virtual void | SetMaximumStepLength (double _arg) |
virtual void | SetMinimumStepLength (double _arg) |
Static Public Member Functions | |
static Pointer | New () |
Protected Member Functions | |
void | BoundStep (double &step) const |
virtual int | CheckSettings () |
virtual void | ComputeCurrentValueAndDerivative () |
virtual void | ComputeNewStepAndInterval () |
virtual void | ForceSufficientDecreaseInIntervalWidth () |
virtual void | GetInitialValueAndDerivative () |
void | InitializeLineSearch () |
MoreThuenteLineSearchOptimizer () | |
virtual void | PrepareForUnusualTermination () |
void | PrintSelf (std::ostream &os, Indent indent) const override |
virtual int | SafeGuardedStep (double &stx, double &fx, double &dx, double &sty, double &fy, double &dy, double &stp, const double fp, const double dp, bool &brackt, const double stpmin, const double stpmax) const |
virtual void | TestConvergence (bool &stop) |
virtual void | UpdateIntervalMinimumAndMaximum () |
~MoreThuenteLineSearchOptimizer () override=default | |
Protected Member Functions inherited from itk::LineSearchOptimizer | |
double | DirectionalDerivative (const DerivativeType &derivative) const |
LineSearchOptimizer () | |
void | PrintSelf (std::ostream &os, Indent indent) const override |
virtual void | SetCurrentStepLength (double step) |
~LineSearchOptimizer () override=default | |
Protected Attributes | |
bool | m_brackt {} |
unsigned long | m_CurrentIteration {} |
bool | m_CurvatureConditionSatisfied {} |
double | m_dg {} |
double | m_dginit {} |
double | m_dgtest {} |
double | m_dgx {} |
double | m_dgy {} |
MeasureType | m_f {} |
MeasureType | m_finit {} |
MeasureType | m_fx {} |
MeasureType | m_fy {} |
DerivativeType | m_g {} |
bool | m_InitialDerivativeProvided {} |
bool | m_InitialValueProvided {} |
bool | m_SafeGuardedStepFailed {} |
bool | m_stage1 {} |
double | m_step {} |
double | m_stepmax {} |
double | m_stepmin {} |
double | m_stepx {} |
double | m_stepy {} |
bool | m_Stop {} |
StopConditionType | m_StopCondition {} |
bool | m_SufficientDecreaseConditionSatisfied {} |
double | m_width {} |
double | m_width1 {} |
Protected Attributes inherited from itk::LineSearchOptimizer | |
double | m_CurrentStepLength {} |
Private Attributes | |
double | m_GradientTolerance {} |
double | m_IntervalTolerance {} |
unsigned long | m_MaximumNumberOfIterations {} |
double | m_ValueTolerance {} |
using itk::MoreThuenteLineSearchOptimizer::ConstPointer = SmartPointer<const Self> |
Definition at line 79 of file itkMoreThuenteLineSearchOptimizer.h.
using itk::MoreThuenteLineSearchOptimizer::Pointer = SmartPointer<Self> |
Definition at line 78 of file itkMoreThuenteLineSearchOptimizer.h.
Definition at line 76 of file itkMoreThuenteLineSearchOptimizer.h.
Definition at line 77 of file itkMoreThuenteLineSearchOptimizer.h.
Enumerator | |
---|---|
StrongWolfeConditionsSatisfied | |
MetricError | |
MaximumNumberOfIterations | |
StepTooSmall | |
StepTooLarge | |
IntervalTooSmall | |
RoundingError | |
AscentSearchDirection | |
Unknown |
Definition at line 89 of file itkMoreThuenteLineSearchOptimizer.h.
|
protected |
|
overrideprotecteddefault |
|
protected |
Force a step to be within the bounds MinimumStepLength and MaximumStepLength
|
protectedvirtual |
Check the input settings for errors.
|
protectedvirtual |
Ask the cost function to compute m_f and m_g at the current position.
|
protectedvirtual |
Update the interval of uncertainty and compute the new step
|
protectedvirtual |
Force a sufficient decrease in the size of the interval of uncertainty
|
virtual |
Reimplemented from itk::LineSearchOptimizer.
|
overridevirtual |
Implements itk::LineSearchOptimizer.
|
virtual |
|
virtual |
Progress information: about the state of convergence
|
overridevirtual |
Implements itk::LineSearchOptimizer.
|
overridevirtual |
Progress information: value, derivative, and directional derivative at the current position.
Implements itk::LineSearchOptimizer.
|
virtual |
|
virtual |
|
protectedvirtual |
Load the initial value and derivative into m_f and m_g.
|
virtual |
|
virtual |
Setting: the maximum number of iterations. 20 by default.
|
virtual |
|
virtual |
|
virtual |
|
protected |
Initialize the interval of uncertainty etc.
itk::MoreThuenteLineSearchOptimizer::ITK_DISALLOW_COPY_AND_MOVE | ( | MoreThuenteLineSearchOptimizer | ) |
|
static |
|
protectedvirtual |
Set m_step to the best step until now, if unusual termination is expected
|
overrideprotected |
|
protectedvirtual |
Advance a step along the line search direction and update the interval of uncertainty.
|
virtual |
Setting: the gradient tolerance. By default set to 0.9.
The line search tries to find a StepLength that satisfies the curvature condition: ABS(dF/ds(X + StepLength * s) <= GradientTolerance * ABS(dF/ds(X)
The lower this value, the more accurate the line search. It must be larger than the ValueTolerance.
|
overridevirtual |
If initial derivative and/or value are given we can save some computation time!
Reimplemented from itk::LineSearchOptimizer.
|
overridevirtual |
Reimplemented from itk::LineSearchOptimizer.
|
virtual |
Setting: the interval tolerance. By default set to the the machine precision.
If value and gradient tolerance can not be satisfied both, the algorithm stops when rounding errors prevent further progress: when the interval of uncertainty is smaller than the interval tolerance.
|
virtual |
|
virtual |
Setting: the value tolerance. By default set to 1e-4.
The line search tries to find a StepLength that satisfies the sufficient decrease condition: F(X + StepLength * s) <= F(X) + ValueTolerance * StepLength * dF/ds(X) where s is the search direction
It must be larger than 0.0, and smaller than the GradientTolerance.
|
override |
|
virtual |
|
protectedvirtual |
Check for convergence
|
protectedvirtual |
Set the minimum and maximum steps to correspond to the the present interval of uncertainty.
|
protected |
Definition at line 272 of file itkMoreThuenteLineSearchOptimizer.h.
|
protected |
Definition at line 184 of file itkMoreThuenteLineSearchOptimizer.h.
|
protected |
Definition at line 190 of file itkMoreThuenteLineSearchOptimizer.h.
|
protected |
Definition at line 263 of file itkMoreThuenteLineSearchOptimizer.h.
|
protected |
Definition at line 264 of file itkMoreThuenteLineSearchOptimizer.h.
|
protected |
Definition at line 267 of file itkMoreThuenteLineSearchOptimizer.h.
|
protected |
Definition at line 265 of file itkMoreThuenteLineSearchOptimizer.h.
|
protected |
Definition at line 266 of file itkMoreThuenteLineSearchOptimizer.h.
|
protected |
Definition at line 257 of file itkMoreThuenteLineSearchOptimizer.h.
|
protected |
Definition at line 260 of file itkMoreThuenteLineSearchOptimizer.h.
|
protected |
Definition at line 258 of file itkMoreThuenteLineSearchOptimizer.h.
|
protected |
Definition at line 259 of file itkMoreThuenteLineSearchOptimizer.h.
|
protected |
Definition at line 262 of file itkMoreThuenteLineSearchOptimizer.h.
|
private |
Definition at line 279 of file itkMoreThuenteLineSearchOptimizer.h.
|
protected |
Definition at line 185 of file itkMoreThuenteLineSearchOptimizer.h.
|
protected |
Definition at line 186 of file itkMoreThuenteLineSearchOptimizer.h.
|
private |
Definition at line 280 of file itkMoreThuenteLineSearchOptimizer.h.
|
private |
Definition at line 277 of file itkMoreThuenteLineSearchOptimizer.h.
|
protected |
Definition at line 274 of file itkMoreThuenteLineSearchOptimizer.h.
|
protected |
Definition at line 273 of file itkMoreThuenteLineSearchOptimizer.h.
|
protected |
Definition at line 251 of file itkMoreThuenteLineSearchOptimizer.h.
|
protected |
Definition at line 255 of file itkMoreThuenteLineSearchOptimizer.h.
|
protected |
Definition at line 254 of file itkMoreThuenteLineSearchOptimizer.h.
|
protected |
Definition at line 252 of file itkMoreThuenteLineSearchOptimizer.h.
|
protected |
Definition at line 253 of file itkMoreThuenteLineSearchOptimizer.h.
|
protected |
Definition at line 188 of file itkMoreThuenteLineSearchOptimizer.h.
|
protected |
Definition at line 187 of file itkMoreThuenteLineSearchOptimizer.h.
|
protected |
Definition at line 189 of file itkMoreThuenteLineSearchOptimizer.h.
|
private |
Definition at line 278 of file itkMoreThuenteLineSearchOptimizer.h.
|
protected |
Definition at line 269 of file itkMoreThuenteLineSearchOptimizer.h.
|
protected |
Definition at line 270 of file itkMoreThuenteLineSearchOptimizer.h.
Generated on 2024-07-17 for elastix by 1.11.0 (9b424b03c9833626cd435af22a444888fbbb192d) |