go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itk::RSGDEachParameterApartBaseOptimizer Class Reference

#include <itkRSGDEachParameterApartBaseOptimizer.h>

Detailed Description

An optimizer based on gradient descent...

This optimizer

Definition at line 36 of file itkRSGDEachParameterApartBaseOptimizer.h.

Inheritance diagram for itk::RSGDEachParameterApartBaseOptimizer:

Public Types

using ConstPointer = SmartPointer<const Self>
 
using Pointer = SmartPointer<Self>
 
using Self = RSGDEachParameterApartBaseOptimizer
 
enum  StopConditionType {
  GradientMagnitudeTolerance = 1 , StepTooSmall , ImageNotAvailable , SamplesNotAvailable ,
  MaximumNumberOfIterations , MetricError
}
 
using Superclass = SingleValuedNonLinearOptimizer
 

Public Member Functions

virtual const char * GetClassName () const
 
virtual unsigned long GetCurrentIteration () const
 
virtual double GetCurrentStepLength () const
 
virtual const DerivativeType & GetCurrentStepLengths ()
 
virtual const DerivativeType & GetGradient ()
 
virtual double GetGradientMagnitude () const
 
virtual double GetGradientMagnitudeTolerance () const
 
virtual bool GetMaximize () const
 
virtual double GetMaximumStepLength () const
 
bool GetMinimize () const
 
virtual double GetMinimumStepLength () const
 
virtual unsigned long GetNumberOfIterations () const
 
virtual StopConditionType GetStopCondition () const
 
virtual MeasureType GetValue () const
 
 ITK_DISALLOW_COPY_AND_MOVE (RSGDEachParameterApartBaseOptimizer)
 
virtual void MaximizeOff ()
 
virtual void MaximizeOn ()
 
void MinimizeOff ()
 
void MinimizeOn ()
 
void ResumeOptimization ()
 
virtual void SetGradientMagnitudeTolerance (double _arg)
 
virtual void SetMaximize (bool _arg)
 
virtual void SetMaximumStepLength (double _arg)
 
void SetMinimize (bool v)
 
virtual void SetMinimumStepLength (double _arg)
 
virtual void SetNumberOfIterations (unsigned long _arg)
 
void StartOptimization () override
 
void StopOptimization ()
 

Static Public Member Functions

static Pointer New ()
 

Protected Member Functions

virtual void AdvanceOneStep ()
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
 RSGDEachParameterApartBaseOptimizer ()
 
virtual void StepAlongGradient (const DerivativeType &, const DerivativeType &)
 
 ~RSGDEachParameterApartBaseOptimizer () override=default
 

Private Attributes

unsigned long m_CurrentIteration { 0 }
 
double m_CurrentStepLength { 0 }
 
DerivativeType m_CurrentStepLengths {}
 
DerivativeType m_Gradient {}
 
double m_GradientMagnitude { 0.0 }
 
double m_GradientMagnitudeTolerance { 1e-4 }
 
bool m_Maximize { false }
 
double m_MaximumStepLength { 1.0 }
 
double m_MinimumStepLength { 1e-3 }
 
unsigned long m_NumberOfIterations { 100 }
 
DerivativeType m_PreviousGradient {}
 
bool m_Stop { false }
 
StopConditionType m_StopCondition { MaximumNumberOfIterations }
 
MeasureType m_Value { 0.0 }
 

Member Typedef Documentation

◆ ConstPointer

◆ Pointer

◆ Self

◆ Superclass

Member Enumeration Documentation

◆ StopConditionType

Codes of stopping conditions.

Enumerator
GradientMagnitudeTolerance 
StepTooSmall 
ImageNotAvailable 
SamplesNotAvailable 
MaximumNumberOfIterations 
MetricError 

Definition at line 54 of file itkRSGDEachParameterApartBaseOptimizer.h.

Constructor & Destructor Documentation

◆ RSGDEachParameterApartBaseOptimizer()

itk::RSGDEachParameterApartBaseOptimizer::RSGDEachParameterApartBaseOptimizer ( )
protected

◆ ~RSGDEachParameterApartBaseOptimizer()

itk::RSGDEachParameterApartBaseOptimizer::~RSGDEachParameterApartBaseOptimizer ( )
overrideprotecteddefault

Member Function Documentation

◆ AdvanceOneStep()

virtual void itk::RSGDEachParameterApartBaseOptimizer::AdvanceOneStep ( )
protectedvirtual

Advance one step following the gradient direction This method verifies if a change in direction is required and if a reduction in steplength is required.

◆ GetClassName()

virtual const char * itk::RSGDEachParameterApartBaseOptimizer::GetClassName ( ) const
virtual

Run-time type information (and related methods).

Reimplemented in elastix::RSGDEachParameterApart< TElastix >, and itk::RSGDEachParameterApartOptimizer.

◆ GetCurrentIteration()

virtual unsigned long itk::RSGDEachParameterApartBaseOptimizer::GetCurrentIteration ( ) const
virtual

◆ GetCurrentStepLength()

virtual double itk::RSGDEachParameterApartBaseOptimizer::GetCurrentStepLength ( ) const
virtual

Get the current average step length

◆ GetCurrentStepLengths()

virtual const DerivativeType & itk::RSGDEachParameterApartBaseOptimizer::GetCurrentStepLengths ( )
virtual

Get the array of all step lengths

◆ GetGradient()

virtual const DerivativeType & itk::RSGDEachParameterApartBaseOptimizer::GetGradient ( )
virtual

◆ GetGradientMagnitude()

virtual double itk::RSGDEachParameterApartBaseOptimizer::GetGradientMagnitude ( ) const
virtual

Get the current GradientMagnitude

◆ GetGradientMagnitudeTolerance()

virtual double itk::RSGDEachParameterApartBaseOptimizer::GetGradientMagnitudeTolerance ( ) const
virtual

◆ GetMaximize()

virtual bool itk::RSGDEachParameterApartBaseOptimizer::GetMaximize ( ) const
virtual

◆ GetMaximumStepLength()

virtual double itk::RSGDEachParameterApartBaseOptimizer::GetMaximumStepLength ( ) const
virtual

◆ GetMinimize()

bool itk::RSGDEachParameterApartBaseOptimizer::GetMinimize ( ) const
inline

Definition at line 69 of file itkRSGDEachParameterApartBaseOptimizer.h.

◆ GetMinimumStepLength()

virtual double itk::RSGDEachParameterApartBaseOptimizer::GetMinimumStepLength ( ) const
virtual

◆ GetNumberOfIterations()

virtual unsigned long itk::RSGDEachParameterApartBaseOptimizer::GetNumberOfIterations ( ) const
virtual

◆ GetStopCondition()

virtual StopConditionType itk::RSGDEachParameterApartBaseOptimizer::GetStopCondition ( ) const
virtual

◆ GetValue()

virtual MeasureType itk::RSGDEachParameterApartBaseOptimizer::GetValue ( ) const
virtual

◆ ITK_DISALLOW_COPY_AND_MOVE()

itk::RSGDEachParameterApartBaseOptimizer::ITK_DISALLOW_COPY_AND_MOVE ( RSGDEachParameterApartBaseOptimizer )

◆ MaximizeOff()

virtual void itk::RSGDEachParameterApartBaseOptimizer::MaximizeOff ( )
virtual

◆ MaximizeOn()

virtual void itk::RSGDEachParameterApartBaseOptimizer::MaximizeOn ( )
virtual

◆ MinimizeOff()

void itk::RSGDEachParameterApartBaseOptimizer::MinimizeOff ( )
inline

Definition at line 84 of file itkRSGDEachParameterApartBaseOptimizer.h.

◆ MinimizeOn()

void itk::RSGDEachParameterApartBaseOptimizer::MinimizeOn ( )
inline

Definition at line 79 of file itkRSGDEachParameterApartBaseOptimizer.h.

◆ New()

static Pointer itk::RSGDEachParameterApartBaseOptimizer::New ( )
static

Method for creation through the object factory.

◆ PrintSelf()

void itk::RSGDEachParameterApartBaseOptimizer::PrintSelf ( std::ostream & os,
Indent indent ) const
overrideprotected

◆ ResumeOptimization()

void itk::RSGDEachParameterApartBaseOptimizer::ResumeOptimization ( )

Resume previously stopped optimization with current parameters.

See also
StopOptimization

◆ SetGradientMagnitudeTolerance()

virtual void itk::RSGDEachParameterApartBaseOptimizer::SetGradientMagnitudeTolerance ( double _arg)
virtual

◆ SetMaximize()

virtual void itk::RSGDEachParameterApartBaseOptimizer::SetMaximize ( bool _arg)
virtual

Specify whether to minimize or maximize the cost function.

◆ SetMaximumStepLength()

virtual void itk::RSGDEachParameterApartBaseOptimizer::SetMaximumStepLength ( double _arg)
virtual

Set/Get parameters to control the optimization process.

◆ SetMinimize()

void itk::RSGDEachParameterApartBaseOptimizer::SetMinimize ( bool v)
inline

Definition at line 74 of file itkRSGDEachParameterApartBaseOptimizer.h.

◆ SetMinimumStepLength()

virtual void itk::RSGDEachParameterApartBaseOptimizer::SetMinimumStepLength ( double _arg)
virtual

◆ SetNumberOfIterations()

virtual void itk::RSGDEachParameterApartBaseOptimizer::SetNumberOfIterations ( unsigned long _arg)
virtual

◆ StartOptimization()

void itk::RSGDEachParameterApartBaseOptimizer::StartOptimization ( )
override

Start optimization.

◆ StepAlongGradient()

virtual void itk::RSGDEachParameterApartBaseOptimizer::StepAlongGradient ( const DerivativeType & ,
const DerivativeType &  )
inlineprotectedvirtual

Advance one step along the corrected gradient taking into account the steplength represented by factor. This method is invoked by AdvanceOneStep. It is expected to be overrided by optimization methods in non-vector spaces

In RSGDEachParameterApart this function does not accepts a single scalar steplength factor, but an array of factors, which contains the steplength for each parameter apart.

See also
AdvanceOneStep

Reimplemented in itk::RSGDEachParameterApartOptimizer.

Definition at line 149 of file itkRSGDEachParameterApartBaseOptimizer.h.

◆ StopOptimization()

void itk::RSGDEachParameterApartBaseOptimizer::StopOptimization ( )

Stop optimization.

See also
ResumeOptimization

Field Documentation

◆ m_CurrentIteration

unsigned long itk::RSGDEachParameterApartBaseOptimizer::m_CurrentIteration { 0 }
private

Definition at line 176 of file itkRSGDEachParameterApartBaseOptimizer.h.

◆ m_CurrentStepLength

double itk::RSGDEachParameterApartBaseOptimizer::m_CurrentStepLength { 0 }
private

The average current step length

Definition at line 172 of file itkRSGDEachParameterApartBaseOptimizer.h.

◆ m_CurrentStepLengths

DerivativeType itk::RSGDEachParameterApartBaseOptimizer::m_CurrentStepLengths {}
private

All current step lengths

Definition at line 170 of file itkRSGDEachParameterApartBaseOptimizer.h.

◆ m_Gradient

DerivativeType itk::RSGDEachParameterApartBaseOptimizer::m_Gradient {}
private

Definition at line 159 of file itkRSGDEachParameterApartBaseOptimizer.h.

◆ m_GradientMagnitude

double itk::RSGDEachParameterApartBaseOptimizer::m_GradientMagnitude { 0.0 }
private

Definition at line 178 of file itkRSGDEachParameterApartBaseOptimizer.h.

◆ m_GradientMagnitudeTolerance

double itk::RSGDEachParameterApartBaseOptimizer::m_GradientMagnitudeTolerance { 1e-4 }
private

Definition at line 165 of file itkRSGDEachParameterApartBaseOptimizer.h.

◆ m_Maximize

bool itk::RSGDEachParameterApartBaseOptimizer::m_Maximize { false }
private

Definition at line 163 of file itkRSGDEachParameterApartBaseOptimizer.h.

◆ m_MaximumStepLength

double itk::RSGDEachParameterApartBaseOptimizer::m_MaximumStepLength { 1.0 }
private

Definition at line 166 of file itkRSGDEachParameterApartBaseOptimizer.h.

◆ m_MinimumStepLength

double itk::RSGDEachParameterApartBaseOptimizer::m_MinimumStepLength { 1e-3 }
private

Definition at line 167 of file itkRSGDEachParameterApartBaseOptimizer.h.

◆ m_NumberOfIterations

unsigned long itk::RSGDEachParameterApartBaseOptimizer::m_NumberOfIterations { 100 }
private

Definition at line 175 of file itkRSGDEachParameterApartBaseOptimizer.h.

◆ m_PreviousGradient

DerivativeType itk::RSGDEachParameterApartBaseOptimizer::m_PreviousGradient {}
private

Definition at line 160 of file itkRSGDEachParameterApartBaseOptimizer.h.

◆ m_Stop

bool itk::RSGDEachParameterApartBaseOptimizer::m_Stop { false }
private

Definition at line 162 of file itkRSGDEachParameterApartBaseOptimizer.h.

◆ m_StopCondition

StopConditionType itk::RSGDEachParameterApartBaseOptimizer::m_StopCondition { MaximumNumberOfIterations }
private

Definition at line 174 of file itkRSGDEachParameterApartBaseOptimizer.h.

◆ m_Value

MeasureType itk::RSGDEachParameterApartBaseOptimizer::m_Value { 0.0 }
private

Definition at line 164 of file itkRSGDEachParameterApartBaseOptimizer.h.



Generated on 2024-07-17 for elastix by doxygen 1.11.0 (9b424b03c9833626cd435af22a444888fbbb192d) elastix logo