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 * Copyright UMC Utrecht and contributors
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0.txt
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *
17 *=========================================================================*/
18
19#ifndef __itkFiniteDifferenceGradientDescentOptimizer_h
20#define __itkFiniteDifferenceGradientDescentOptimizer_h
21
23
24namespace itk
25{
26
57{
58public:
59
64 typedef SmartPointer< const Self > ConstPointer;
65
67 itkNewMacro( Self );
68
71
73 typedef enum {
77
79 virtual void AdvanceOneStep( void );
80
82 void StartOptimization( void ) override;
83
86 void ResumeOptimization( void );
87
90 void StopOptimization( void );
91
93 itkSetMacro( NumberOfIterations, unsigned long );
94
96 itkGetConstMacro( NumberOfIterations, unsigned long );
97
99 itkGetConstMacro( CurrentIteration, unsigned long );
100
102 itkGetConstMacro( Value, double );
103
105 itkGetConstMacro( StopCondition, StopConditionType );
106
108 itkSetMacro( Param_a, double );
109 itkGetMacro( Param_a, double );
110
112 itkSetMacro( Param_c, double );
113 itkGetMacro( Param_c, double );
114
116 itkSetMacro( Param_A, double );
117 itkGetMacro( Param_A, double );
118
120 itkSetMacro( Param_alpha, double );
121 itkGetMacro( Param_alpha, double );
122
124 itkSetMacro( Param_gamma, double );
125 itkGetMacro( Param_gamma, double );
126
127 itkGetConstMacro( ComputeCurrentValue, bool );
128 itkSetMacro( ComputeCurrentValue, bool );
129 itkBooleanMacro( ComputeCurrentValue );
130
132 itkGetConstMacro( GradientMagnitude, double );
133 itkGetConstMacro( LearningRate, double );
134
135protected:
136
139
141 void PrintSelf( std::ostream & os, Indent indent ) const override;
142
143 // made protected so subclass can access
147
154
155 // Functions to compute the parameters at iteration k.
156 virtual double Compute_a( unsigned long k ) const;
157
158 virtual double Compute_c( unsigned long k ) const;
159
160private:
161
162 FiniteDifferenceGradientDescentOptimizer( const Self & ); // purposely not implemented
163 void operator=( const Self & ); // purposely not implemented
164
166 bool m_Stop;
167 double m_Value;
169 unsigned long m_NumberOfIterations;
170 unsigned long m_CurrentIteration;
171
173 double m_Param_a;
174 double m_Param_c;
175 double m_Param_A;
178
179};
180
181} // end namespace itk
182
183#endif // end #ifndef __itkFiniteDifferenceGradientDescentOptimizer_h
virtual double Compute_a(unsigned long k) const
void PrintSelf(std::ostream &os, Indent indent) const override
virtual double Compute_c(unsigned long k) const


Generated on 1667476801 for elastix by doxygen 1.9.4 elastix logo