19#ifndef __itkGenericConjugateGradientOptimizer_h
20#define __itkGenericConjugateGradientOptimizer_h
91 itkGetConstMacro( CurrentIteration,
unsigned long );
94 itkGetConstMacro( InLineSearch,
bool );
96 itkGetConstMacro( CurrentStepLength,
double );
105 1, NumericTraits< unsigned long >::max() );
131 itkGetConstMacro( MaxNrOfItWithoutImprovement,
unsigned long );
143 void PrintSelf( std::ostream & os, Indent indent )
const override;
158 itkSetMacro( InLineSearch,
bool );
A set of conjugate gradient algorithms.
virtual void SetMaxNrOfItWithoutImprovement(unsigned long arg)
double m_GradientMagnitudeTolerance
std::map< BetaDefinitionType, ComputeBetaFunctionType > BetaDefinitionMapType
double ComputeBetaPR(const DerivativeType &previousGradient, const DerivativeType &gradient, const ParametersType &previousSearchDir)
Superclass::DerivativeType DerivativeType
void PrintSelf(std::ostream &os, Indent indent) const override
virtual void SetBetaDefinition(const BetaDefinitionType &arg)
virtual bool TestConvergence(bool firstLineSearchDone)
StopConditionType m_StopCondition
BetaDefinitionType m_BetaDefinition
double m_CurrentStepLength
SmartPointer< Self > Pointer
bool m_UseDefaultMaxNrOfItWithoutImprovement
void StartOptimization(void) override
DerivativeType m_CurrentGradient
Superclass::MeasureType MeasureType
virtual void ResumeOptimization(void)
std::string BetaDefinitionType
BetaDefinitionMapType m_BetaDefinitionMap
GenericConjugateGradientOptimizer Self
double ComputeBetaHS(const DerivativeType &previousGradient, const DerivativeType &gradient, const ParametersType &previousSearchDir)
@ MaximumNumberOfIterations
@ GradientMagnitudeTolerance
GenericConjugateGradientOptimizer(const Self &)
Superclass::CostFunctionType CostFunctionType
unsigned long m_CurrentIteration
SmartPointer< const Self > ConstPointer
ScaledSingleValuedNonLinearOptimizer Superclass
virtual void StopOptimization(void)
LineSearchOptimizerPointer m_LineSearchOptimizer
virtual void ComputeSearchDirection(const DerivativeType &previousGradient, const DerivativeType &gradient, ParametersType &searchDir)
double ComputeBetaSD(const DerivativeType &previousGradient, const DerivativeType &gradient, const ParametersType &previousSearchDir)
bool m_PreviousGradientAndSearchDirValid
virtual void LineSearch(const ParametersType searchDir, double &step, ParametersType &x, MeasureType &f, DerivativeType &g)
double ComputeBetaFR(const DerivativeType &previousGradient, const DerivativeType &gradient, const ParametersType &previousSearchDir)
LineSearchOptimizer LineSearchOptimizerType
MeasureType m_CurrentValue
virtual void AddBetaDefinition(const BetaDefinitionType &name, ComputeBetaFunctionType function)
unsigned long m_MaxNrOfItWithoutImprovement
Superclass::ScaledCostFunctionType ScaledCostFunctionType
LineSearchOptimizerType::Pointer LineSearchOptimizerPointer
Superclass::ParametersType ParametersType
void operator=(const Self &)
virtual double ComputeBeta(const DerivativeType &previousGradient, const DerivativeType &gradient, const ParametersType &previousSearchDir)
Superclass::ScalesType ScalesType
unsigned long m_MaximumNumberOfIterations
double(Self::* ComputeBetaFunctionType)(const DerivativeType &, const DerivativeType &, const ParametersType &)
double ComputeBetaDY(const DerivativeType &previousGradient, const DerivativeType &gradient, const ParametersType &previousSearchDir)
double ComputeBetaDYHS(const DerivativeType &previousGradient, const DerivativeType &gradient, const ParametersType &previousSearchDir)
itkGetModifiableObjectMacro(LineSearchOptimizer, LineSearchOptimizerType)
A base class for LineSearch optimizers.
NonLinearOptimizer::ScalesType ScalesType
Superclass::ParametersType ParametersType
ScaledSingleValuedCostFunction ScaledCostFunctionType
Superclass::DerivativeType DerivativeType
Superclass::CostFunctionType CostFunctionType
Superclass::MeasureType MeasureType