go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itkFiniteDifferenceGradientDescentOptimizer.h
Go to the documentation of this file.
1 /*======================================================================
2 
3  This file is part of the elastix software.
4 
5  Copyright (c) University Medical Center Utrecht. All rights reserved.
6  See src/CopyrightElastix.txt or http://elastix.isi.uu.nl/legal.php for
7  details.
8 
9  This software is distributed WITHOUT ANY WARRANTY; without even
10  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11  PURPOSE. See the above copyright notices for more information.
12 
13 ======================================================================*/
14 
15 #ifndef __itkFiniteDifferenceGradientDescentOptimizer_h
16 #define __itkFiniteDifferenceGradientDescentOptimizer_h
17 
19 
20 
21 namespace itk
22 {
23 
54  {
55  public:
56 
60  typedef SmartPointer<Self> Pointer;
61  typedef SmartPointer<const Self> ConstPointer;
62 
64  itkNewMacro( Self );
65 
68 
70  typedef enum {
74 
75 
77  virtual void AdvanceOneStep( void );
78 
80  void StartOptimization( void );
81 
84  void ResumeOptimization( void );
85 
88  void StopOptimization( void );
89 
91  itkSetMacro( NumberOfIterations, unsigned long );
92 
94  itkGetConstMacro( NumberOfIterations, unsigned long );
95 
97  itkGetConstMacro( CurrentIteration, unsigned long );
98 
100  itkGetConstMacro( Value, double );
101 
103  itkGetConstMacro( StopCondition, StopConditionType );
104 
106  itkSetMacro( Param_a, double );
107  itkGetMacro( Param_a, double );
108 
110  itkSetMacro( Param_c, double );
111  itkGetMacro( Param_c, double );
112 
114  itkSetMacro( Param_A, double );
115  itkGetMacro( Param_A, double );
116 
118  itkSetMacro( Param_alpha, double );
119  itkGetMacro( Param_alpha, double );
120 
122  itkSetMacro( Param_gamma, double );
123  itkGetMacro( Param_gamma, double );
124 
125  itkGetConstMacro( ComputeCurrentValue, bool );
126  itkSetMacro( ComputeCurrentValue, bool );
127  itkBooleanMacro( ComputeCurrentValue );
128 
130  itkGetConstMacro( GradientMagnitude, double );
131  itkGetConstMacro( LearningRate, double);
132 
133  protected:
134 
137 
139  void PrintSelf( std::ostream& os, Indent indent ) const;
140 
141  // made protected so subclass can access
145 
152 
153  // Functions to compute the parameters at iteration k.
154  virtual double Compute_a( unsigned long k ) const;
155  virtual double Compute_c( unsigned long k ) const;
156 
157  private:
158 
159  FiniteDifferenceGradientDescentOptimizer( const Self& ); // purposely not implemented
160  void operator=( const Self& ); // purposely not implemented
161 
163  bool m_Stop;
164  double m_Value;
166  unsigned long m_NumberOfIterations;
167  unsigned long m_CurrentIteration;
168 
170  double m_Param_a;
171  double m_Param_c;
172  double m_Param_A;
175 
176  }; // end class FiniteDifferenceGradientDescentOptimizer
177 
178 
179 } // end namespace itk
180 
181 
182 #endif // end #ifndef __itkFiniteDifferenceGradientDescentOptimizer_h
183 
virtual double Compute_c(unsigned long k) const
virtual double Compute_a(unsigned long k) const
void PrintSelf(std::ostream &os, Indent indent) const


Generated on 04-01-2014 for elastix by doxygen 1.8.5 elastix logo