go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itkStandardGradientDescentOptimizer.h
Go to the documentation of this file.
00001 /*======================================================================
00002 
00003   This file is part of the elastix software.
00004 
00005   Copyright (c) University Medical Center Utrecht. All rights reserved.
00006   See src/CopyrightElastix.txt or http://elastix.isi.uu.nl/legal.php for
00007   details.
00008 
00009      This software is distributed WITHOUT ANY WARRANTY; without even
00010      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00011      PURPOSE. See the above copyright notices for more information.
00012 
00013 ======================================================================*/
00014 
00015 #ifndef __itkStandardGradientDescentOptimizer_h
00016 #define __itkStandardGradientDescentOptimizer_h
00017 
00018 #include "itkGradientDescentOptimizer2.h"
00019 
00020 namespace itk
00021 {
00022 
00061   class StandardGradientDescentOptimizer :
00062     public GradientDescentOptimizer2
00063   {
00064   public:
00065 
00067     typedef StandardGradientDescentOptimizer    Self;
00068     typedef GradientDescentOptimizer2           Superclass;
00069 
00070     typedef SmartPointer<Self>                  Pointer;
00071     typedef SmartPointer<const Self>            ConstPointer;
00072 
00074     itkNewMacro( Self );
00075 
00077     itkTypeMacro( StandardGradientDescentOptimizer, GradientDescentOptimizer2 );
00078 
00080     typedef Superclass::MeasureType               MeasureType;
00081     typedef Superclass::ParametersType            ParametersType;
00082     typedef Superclass::DerivativeType            DerivativeType;
00083     typedef Superclass::CostFunctionType          CostFunctionType;
00084     typedef Superclass::ScalesType                ScalesType;
00085     typedef Superclass::ScaledCostFunctionType    ScaledCostFunctionType;
00086     typedef Superclass::ScaledCostFunctionPointer ScaledCostFunctionPointer;
00087     typedef Superclass::StopConditionType         StopConditionType;
00088 
00090     itkSetMacro( Param_a, double );
00091     itkGetConstMacro( Param_a, double );
00092 
00094     itkSetMacro( Param_A, double );
00095     itkGetConstMacro( Param_A, double );
00096 
00098     itkSetMacro( Param_alpha, double );
00099     itkGetConstMacro( Param_alpha, double );
00100 
00103     virtual void AdvanceOneStep( void );
00104 
00106     virtual void StartOptimization( void );
00107 
00113     itkSetMacro( InitialTime, double );
00114     itkGetConstMacro( InitialTime, double );
00115 
00118     itkGetConstMacro( CurrentTime, double );
00119 
00123     virtual void ResetCurrentTimeToInitialTime( void )
00124     {
00125       this->m_CurrentTime = this->m_InitialTime;
00126     }
00127 
00128   protected:
00129 
00130     StandardGradientDescentOptimizer();
00131     virtual ~StandardGradientDescentOptimizer() {};
00132 
00134     virtual double Compute_a( double k ) const;
00135 
00140     virtual void UpdateCurrentTime( void );
00141 
00143     double m_CurrentTime;
00144 
00145   private:
00146 
00147     StandardGradientDescentOptimizer( const Self& );  // purposely not implemented
00148     void operator=( const Self& );              // purposely not implemented
00149 
00151     double                        m_Param_a;
00152     double                        m_Param_A;
00153     double                        m_Param_alpha;
00154 
00156     double                        m_InitialTime;
00157 
00158   }; // end class StandardGradientDescentOptimizer
00159 
00160 
00161 } // end namespace itk
00162 
00163 
00164 #endif // end #ifndef __itkStandardGradientDescentOptimizer_h
00165 
00166 


Generated on 24-05-2012 for elastix by doxygen 1.7.6.1 elastix logo