ITK  4.1.0
Insight Segmentation and Registration Toolkit
Public Types | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Private Member Functions | Friends
itk::GradientDescentOptimizerBasev4 Class Reference

#include <itkGradientDescentOptimizerBasev4.h>

+ Inheritance diagram for itk::GradientDescentOptimizerBasev4:
+ Collaboration diagram for itk::GradientDescentOptimizerBasev4:

List of all members.

Public Types

typedef SmartPointer< const SelfConstPointer
typedef MetricType::DerivativeType DerivativeType
typedef
Superclass::InternalComputationValueType 
InternalComputationValueType
typedef Superclass::MeasureType MeasureType
typedef Superclass::MetricType MetricType
typedef MetricType::Pointer MetricTypePointer
typedef SmartPointer< SelfPointer
typedef
GradientDescentOptimizerBasev4 
Self
typedef std::ostringstream StopConditionDescriptionType
typedef std::string StopConditionReturnStringType
enum  StopConditionType {
  MAXIMUM_NUMBER_OF_ITERATIONS,
  COSTFUNCTION_ERROR,
  UPDATE_PARAMETERS_ERROR,
  STEP_TOO_SMALL,
  QUASI_NEWTON_STEP_ERROR,
  CONVERGENCE_CHECKER_PASSED,
  OTHER_ERROR
}
typedef ObjectToObjectOptimizerBase Superclass

Public Member Functions

virtual SizeValueType GetCurrentIteration () const
virtual const DerivativeTypeGetGradient ()
virtual const char * GetNameOfClass () const
virtual const SizeValueTypeGetNumberOfIterations ()
virtual const StopConditionTypeGetStopCondition ()
virtual const
StopConditionReturnStringType 
GetStopConditionDescription () const
virtual void ModifyGradient ()
virtual void ResumeOptimization ()=0
virtual void SetNumberOfIterations (SizeValueType _arg)
virtual void StopOptimization (void)

Protected Types

typedef
GradientDescentOptimizerBasev4ModifyGradientByScalesThreader::IndexRangeType 
IndexRangeType

Protected Member Functions

virtual void EstimateLearningRate ()=0
virtual void ModifyGradientByLearningRateOverSubRange (const IndexRangeType &subrange)=0
virtual void ModifyGradientByScalesOverSubRange (const IndexRangeType &subrange)=0
virtual void PrintSelf (std::ostream &os, Indent indent) const
 GradientDescentOptimizerBasev4 ()
virtual ~GradientDescentOptimizerBasev4 ()

Protected Attributes

SizeValueType m_CurrentIteration
DerivativeType m_Gradient
GradientDescentOptimizerBasev4ModifyGradientByLearningRateThreader::Pointer m_ModifyGradientByLearningRateThreader
GradientDescentOptimizerBasev4ModifyGradientByScalesThreader::Pointer m_ModifyGradientByScalesThreader
SizeValueType m_NumberOfIterations
bool m_Stop
StopConditionType m_StopCondition
StopConditionDescriptionType m_StopConditionDescription

Private Member Functions

 GradientDescentOptimizerBasev4 (const Self &)
void operator= (const Self &)

Friends

class GradientDescentOptimizerBasev4ModifyGradientByLearningRateThreader
class GradientDescentOptimizerBasev4ModifyGradientByScalesThreader

Detailed Description

Abstract base class for gradient descent-style optimizers.

Gradient modification is threaded in ModifyGradient.

Derived classes must override ModifyGradientOverSubRange and ResumeOptimization.

Definition at line 38 of file itkGradientDescentOptimizerBasev4.h.


Member Typedef Documentation

Derivative type

Reimplemented in itk::GradientDescentOptimizerv4, and itk::MultiGradientOptimizerv4.

Definition at line 73 of file itkGradientDescentOptimizerBasev4.h.

Definition at line 128 of file itkGradientDescentOptimizerBasev4.h.

Internal computation type, for maintaining a desired precision

Reimplemented from itk::ObjectToObjectOptimizerBase.

Reimplemented in itk::GradientDescentOptimizerv4, itk::MultiGradientOptimizerv4, and itk::QuasiNewtonOptimizerv4.

Definition at line 79 of file itkGradientDescentOptimizerBasev4.h.

Measure type

Reimplemented from itk::ObjectToObjectOptimizerBase.

Reimplemented in itk::GradientDescentOptimizerv4, and itk::MultiGradientOptimizerv4.

Definition at line 76 of file itkGradientDescentOptimizerBasev4.h.

Metric type over which this class is templated

Reimplemented from itk::ObjectToObjectOptimizerBase.

Reimplemented in itk::MultiGradientOptimizerv4.

Definition at line 69 of file itkGradientDescentOptimizerBasev4.h.

Reimplemented from itk::ObjectToObjectOptimizerBase.

Reimplemented in itk::MultiGradientOptimizerv4.

Definition at line 70 of file itkGradientDescentOptimizerBasev4.h.

Standard class typedefs.

Reimplemented from itk::ObjectToObjectOptimizerBase.

Reimplemented in itk::GradientDescentOptimizerv4, itk::QuasiNewtonOptimizerv4, and itk::MultiGradientOptimizerv4.

Definition at line 43 of file itkGradientDescentOptimizerBasev4.h.

Stop condition internal string type

Reimplemented in itk::MultiGradientOptimizerv4.

Definition at line 66 of file itkGradientDescentOptimizerBasev4.h.

Stop condition return string type

Reimplemented in itk::MultiGradientOptimizerv4.

Definition at line 63 of file itkGradientDescentOptimizerBasev4.h.


Member Enumeration Documentation

Codes of stopping conditions.

Enumerator:
MAXIMUM_NUMBER_OF_ITERATIONS 
COSTFUNCTION_ERROR 
UPDATE_PARAMETERS_ERROR 
STEP_TOO_SMALL 
QUASI_NEWTON_STEP_ERROR 
CONVERGENCE_CHECKER_PASSED 
OTHER_ERROR 

Definition at line 52 of file itkGradientDescentOptimizerBasev4.h.


Constructor & Destructor Documentation

Default constructor

Default constructor


Member Function Documentation

virtual void itk::GradientDescentOptimizerBasev4::EstimateLearningRate ( ) [protected, pure virtual]

Estimate the learning rate. Derived classes can modify the learning rate in this method, or leave it unmodified. It is called during ModifyGradient().

Implemented in itk::GradientDescentOptimizerv4.

Get the current iteration number.

Reimplemented in itk::MultiGradientOptimizerv4.

Get the most recent gradient values.

virtual const char* itk::GradientDescentOptimizerBasev4::GetNameOfClass ( ) const [virtual]

Run-time type information (and related methods).

Reimplemented from itk::ObjectToObjectOptimizerBase.

Reimplemented in itk::GradientDescentOptimizerv4, itk::QuasiNewtonOptimizerv4, and itk::MultiGradientOptimizerv4.

Get the number of iterations.

Reimplemented in itk::MultiGradientOptimizerv4.

Get stop condition enum

Reimplemented in itk::MultiGradientOptimizerv4.

Get the reason for termination

Reimplemented in itk::MultiGradientOptimizerv4.

Modify the gradient in place, to advance the optimization. This call performs a threaded modification for transforms with local support (assumed to be dense). Otherwise the modification is performed w/out threading. At completion, m_Gradient can be used to update the transform parameters. Derived classes may hold additional results in other member variables.

virtual void itk::GradientDescentOptimizerBasev4::ModifyGradientByLearningRateOverSubRange ( const IndexRangeType subrange) [protected, pure virtual]

Derived classes define this worker method to modify the gradient by learning rates. Modifications must be performed over the index range defined in subrange. Called from ModifyGradient(), either directly or via threaded operation.

Implemented in itk::GradientDescentOptimizerv4.

virtual void itk::GradientDescentOptimizerBasev4::ModifyGradientByScalesOverSubRange ( const IndexRangeType subrange) [protected, pure virtual]

Derived classes define this worker method to modify the gradient by scales. Modifications must be performed over the index range defined in subrange. Called from ModifyGradient(), either directly or via threaded operation.

Implemented in itk::GradientDescentOptimizerv4.

void itk::GradientDescentOptimizerBasev4::operator= ( const Self ) [private]

Mutex lock to protect modification to the reference count

Reimplemented from itk::ObjectToObjectOptimizerBase.

Reimplemented in itk::GradientDescentOptimizerv4, itk::QuasiNewtonOptimizerv4, and itk::MultiGradientOptimizerv4.

virtual void itk::GradientDescentOptimizerBasev4::PrintSelf ( std::ostream &  os,
Indent  indent 
) const [protected, virtual]

Methods invoked by Print() to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from itk::ObjectToObjectOptimizerBase.

Reimplemented in itk::GradientDescentOptimizerv4, itk::QuasiNewtonOptimizerv4, and itk::MultiGradientOptimizerv4.

Resume optimization. This runs the optimization loop, and allows continuation of stopped optimization

Implemented in itk::GradientDescentOptimizerv4, and itk::MultiGradientOptimizerv4.

Set the number of iterations.

Reimplemented in itk::MultiGradientOptimizerv4.

virtual void itk::GradientDescentOptimizerBasev4::StopOptimization ( void  ) [virtual]

Stop optimization. The object is left in a state so the optimization can be resumed by calling ResumeOptimization.

Reimplemented in itk::MultiGradientOptimizerv4.


Friends And Related Function Documentation

Definition at line 126 of file itkGradientDescentOptimizerBasev4.h.

Definition at line 125 of file itkGradientDescentOptimizerBasev4.h.


Member Data Documentation

Reimplemented in itk::MultiGradientOptimizerv4.

Definition at line 157 of file itkGradientDescentOptimizerBasev4.h.

Current gradient

Definition at line 160 of file itkGradientDescentOptimizerBasev4.h.

Definition at line 131 of file itkGradientDescentOptimizerBasev4.h.

Definition at line 130 of file itkGradientDescentOptimizerBasev4.h.

Reimplemented in itk::MultiGradientOptimizerv4.

Definition at line 156 of file itkGradientDescentOptimizerBasev4.h.

Reimplemented in itk::MultiGradientOptimizerv4.

Definition at line 153 of file itkGradientDescentOptimizerBasev4.h.

Reimplemented in itk::MultiGradientOptimizerv4.

Definition at line 154 of file itkGradientDescentOptimizerBasev4.h.

Reimplemented in itk::MultiGradientOptimizerv4.

Definition at line 155 of file itkGradientDescentOptimizerBasev4.h.


The documentation for this class was generated from the following file: