Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages |
#include <itkGenericConjugateGradientOptimizer.h>
A set of conjugate gradient algorithms.
The steplength is determined at each iteration by means of a line search routine. The itk::MoreThuenteLineSearchOptimizer works well.
Definition at line 40 of file itkGenericConjugateGradientOptimizer.h.
Static Public Member Functions | |
static Pointer | New () |
Static Public Member Functions inherited from itk::ScaledSingleValuedNonLinearOptimizer | |
static Pointer | New () |
Protected Member Functions | |
virtual void | AddBetaDefinition (const BetaDefinitionType &name, ComputeBetaFunctionType function) |
virtual double | ComputeBeta (const DerivativeType &previousGradient, const DerivativeType &gradient, const ParametersType &previousSearchDir) |
double | ComputeBetaDY (const DerivativeType &previousGradient, const DerivativeType &gradient, const ParametersType &previousSearchDir) |
double | ComputeBetaDYHS (const DerivativeType &previousGradient, const DerivativeType &gradient, const ParametersType &previousSearchDir) |
double | ComputeBetaFR (const DerivativeType &previousGradient, const DerivativeType &gradient, const ParametersType &previousSearchDir) |
double | ComputeBetaHS (const DerivativeType &previousGradient, const DerivativeType &gradient, const ParametersType &previousSearchDir) |
double | ComputeBetaPR (const DerivativeType &previousGradient, const DerivativeType &gradient, const ParametersType &previousSearchDir) |
double | ComputeBetaSD (const DerivativeType &previousGradient, const DerivativeType &gradient, const ParametersType &previousSearchDir) |
virtual void | ComputeSearchDirection (const DerivativeType &previousGradient, const DerivativeType &gradient, ParametersType &searchDir) |
GenericConjugateGradientOptimizer () | |
virtual void | LineSearch (const ParametersType searchDir, double &step, ParametersType &x, MeasureType &f, DerivativeType &g) |
void | PrintSelf (std::ostream &os, Indent indent) const override |
virtual void | SetInLineSearch (bool _arg) |
virtual bool | TestConvergence (bool firstLineSearchDone) |
~GenericConjugateGradientOptimizer () override | |
Protected Member Functions inherited from itk::ScaledSingleValuedNonLinearOptimizer | |
virtual void | GetScaledDerivative (const ParametersType ¶meters, DerivativeType &derivative) const |
virtual MeasureType | GetScaledValue (const ParametersType ¶meters) const |
virtual void | GetScaledValueAndDerivative (const ParametersType ¶meters, MeasureType &value, DerivativeType &derivative) const |
void | PrintSelf (std::ostream &os, Indent indent) const override |
ScaledSingleValuedNonLinearOptimizer () | |
void | SetCurrentPosition (const ParametersType ¶m) override |
virtual void | SetScaledCurrentPosition (const ParametersType ¶meters) |
~ScaledSingleValuedNonLinearOptimizer () override | |
Private Member Functions | |
GenericConjugateGradientOptimizer (const Self &) | |
void | operator= (const Self &) |
Private Attributes | |
double | m_GradientMagnitudeTolerance |
LineSearchOptimizerPointer | m_LineSearchOptimizer |
unsigned long | m_MaximumNumberOfIterations |
unsigned long | m_MaxNrOfItWithoutImprovement |
double | m_ValueTolerance |
typedef std::map< BetaDefinitionType, ComputeBetaFunctionType > itk::GenericConjugateGradientOptimizer::BetaDefinitionMapType |
Definition at line 72 of file itkGenericConjugateGradientOptimizer.h.
typedef std::string itk::GenericConjugateGradientOptimizer::BetaDefinitionType |
Definition at line 70 of file itkGenericConjugateGradientOptimizer.h.
typedef double(Self::* itk::GenericConjugateGradientOptimizer::ComputeBetaFunctionType) (const DerivativeType &, const DerivativeType &, const ParametersType &) |
Typedef for a function that computes , given the previousGradient, the current gradient, and the previous search direction
Definition at line 66 of file itkGenericConjugateGradientOptimizer.h.
typedef SmartPointer< const Self > itk::GenericConjugateGradientOptimizer::ConstPointer |
Definition at line 48 of file itkGenericConjugateGradientOptimizer.h.
typedef Superclass::CostFunctionType itk::GenericConjugateGradientOptimizer::CostFunctionType |
Definition at line 56 of file itkGenericConjugateGradientOptimizer.h.
Definition at line 55 of file itkGenericConjugateGradientOptimizer.h.
typedef LineSearchOptimizerType::Pointer itk::GenericConjugateGradientOptimizer::LineSearchOptimizerPointer |
Definition at line 62 of file itkGenericConjugateGradientOptimizer.h.
Definition at line 61 of file itkGenericConjugateGradientOptimizer.h.
Definition at line 58 of file itkGenericConjugateGradientOptimizer.h.
typedef Superclass::ParametersType itk::GenericConjugateGradientOptimizer::ParametersType |
Definition at line 54 of file itkGenericConjugateGradientOptimizer.h.
typedef SmartPointer< Self > itk::GenericConjugateGradientOptimizer::Pointer |
Definition at line 47 of file itkGenericConjugateGradientOptimizer.h.
typedef Superclass::ScaledCostFunctionType itk::GenericConjugateGradientOptimizer::ScaledCostFunctionType |
Definition at line 57 of file itkGenericConjugateGradientOptimizer.h.
typedef Superclass::ScalesType itk::GenericConjugateGradientOptimizer::ScalesType |
Definition at line 59 of file itkGenericConjugateGradientOptimizer.h.
Definition at line 45 of file itkGenericConjugateGradientOptimizer.h.
Definition at line 46 of file itkGenericConjugateGradientOptimizer.h.
Enumerator | |
---|---|
MetricError | |
LineSearchError | |
MaximumNumberOfIterations | |
GradientMagnitudeTolerance | |
ValueTolerance | |
InfiniteBeta | |
Unknown |
Definition at line 74 of file itkGenericConjugateGradientOptimizer.h.
|
protected |
|
inlineoverrideprotected |
Definition at line 141 of file itkGenericConjugateGradientOptimizer.h.
|
private |
|
protectedvirtual |
Function to add a new beta definition. The first argument should be a name via which a user can select this definition. The second argument is a pointer to a method that computes . Called in the constructor of this class, and possibly by subclasses.
|
protectedvirtual |
Compute according to the user set -definition
|
protected |
"DaiYuan"
|
protected |
"DaiYuanHestenesStiefel"
|
protected |
"FletcherReeves"
|
protected |
"HestenesStiefel"
|
protected |
"PolakRibiere"
|
protected |
Different definitions of "SteepestDescent: beta=0
|
protectedvirtual |
Compute the search direction:
In the first iteration the search direction is computed as:
On calling, searchDir should equal . On return searchDir equals .
|
virtual |
|
virtual |
Reimplemented from itk::ScaledSingleValuedNonLinearOptimizer.
Reimplemented in elastix::ConjugateGradient< TElastix >.
|
virtual |
|
virtual |
Get information about optimization process:
|
virtual |
|
virtual |
|
virtual |
Setting: the mininum gradient magnitude. By default 1e-5.
The optimizer stops when:
|
virtual |
|
virtual |
Setting: the maximum number of iterations
|
virtual |
|
virtual |
|
virtual |
Setting: a stopping criterion, the value tolerance. By default 1e-5.
The optimizer stops when
is satisfied MaxNrOfItWithoutImprovement times in a row.
itk::GenericConjugateGradientOptimizer::itkGetModifiableObjectMacro | ( | LineSearchOptimizer | , |
LineSearchOptimizerType | |||
) |
|
protectedvirtual |
Perform a line search along the search direction. On calling, , and should contain the current position, the cost function value at this position, and the derivative. On return the step, (new position), (value at ), and (derivative at ) are updated.
Reimplemented in elastix::ConjugateGradient< TElastix >.
|
static |
|
private |
|
overrideprotected |
|
virtual |
|
virtual |
Setting: the definition of , by default "DaiYuanHestenesStiefel"
|
virtual |
|
protectedvirtual |
|
virtual |
Setting: the line search optimizer
|
virtual |
|
virtual |
Setting: the maximum number of iterations in a row that satisfy the value tolerance criterion. By default (if never set) equal to the number of parameters.
|
virtual |
|
override |
|
virtual |
|
protectedvirtual |
Check if convergence has occured; The firstLineSearchDone bool allows the implementation of TestConvergence to decide to skip a few convergence checks when no line search has performed yet (so, before the actual optimisation begins)
Reimplemented in elastix::ConjugateGradient< TElastix >.
|
protected |
The name of the BetaDefinition
Definition at line 167 of file itkGenericConjugateGradientOptimizer.h.
|
protected |
A mapping that links the names of the BetaDefinitions to functions that compute .
Definition at line 171 of file itkGenericConjugateGradientOptimizer.h.
|
protected |
Definition at line 145 of file itkGenericConjugateGradientOptimizer.h.
|
protected |
Definition at line 147 of file itkGenericConjugateGradientOptimizer.h.
|
protected |
Definition at line 150 of file itkGenericConjugateGradientOptimizer.h.
|
protected |
Definition at line 146 of file itkGenericConjugateGradientOptimizer.h.
|
private |
Definition at line 265 of file itkGenericConjugateGradientOptimizer.h.
|
protected |
Is true when the LineSearchOptimizer has been started.
Definition at line 157 of file itkGenericConjugateGradientOptimizer.h.
|
private |
Definition at line 268 of file itkGenericConjugateGradientOptimizer.h.
|
private |
Definition at line 263 of file itkGenericConjugateGradientOptimizer.h.
|
private |
Definition at line 266 of file itkGenericConjugateGradientOptimizer.h.
|
protected |
Flag that says if the previous gradient and search direction are known. Typically 'true' at the start of optimization, or when a stopped optimisation is resumed (in the latter case the previous gradient and search direction may of course still be valid, but to be safe it is assumed that they are not).
Definition at line 164 of file itkGenericConjugateGradientOptimizer.h.
|
protected |
Definition at line 149 of file itkGenericConjugateGradientOptimizer.h.
|
protected |
Definition at line 148 of file itkGenericConjugateGradientOptimizer.h.
|
protected |
Flag that is true as long as the method SetMaxNrOfItWithoutImprovement is never called
Definition at line 154 of file itkGenericConjugateGradientOptimizer.h.
|
private |
Definition at line 264 of file itkGenericConjugateGradientOptimizer.h.
Generated on 1667476801 for elastix by 1.9.4 |