go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itkGradientDescentOptimizer2.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 #ifndef __itkGradientDescentOptimizer2_h
19 #define __itkGradientDescentOptimizer2_h
20 
22 
23 
24 namespace itk
25 {
26 
56 {
57 public:
58 
62  typedef SmartPointer< Self > Pointer;
63  typedef SmartPointer< const Self > ConstPointer;
64 
66  itkNewMacro( Self );
67 
70 
79 
83  typedef enum {
88 
90  virtual void AdvanceOneStep( void );
91 
93  void StartOptimization( void ) override;
94 
97  virtual void ResumeOptimization( void );
98 
100  virtual void MetricErrorResponse( ExceptionObject & err );
101 
104  virtual void StopOptimization( void );
105 
107  itkSetMacro( LearningRate, double );
108 
110  itkGetConstReferenceMacro( LearningRate, double );
111 
113  itkSetMacro( NumberOfIterations, unsigned long );
114 
116  itkGetConstReferenceMacro( NumberOfIterations, unsigned long );
117 
119  itkGetConstMacro( CurrentIteration, unsigned int );
120 
122  itkGetConstReferenceMacro( Value, double );
123 
125  itkGetConstReferenceMacro( StopCondition, StopConditionType );
126 
128  itkGetConstReferenceMacro( Gradient, DerivativeType );
129 
131  itkGetConstReferenceMacro( SearchDirection, DerivativeType );
132 
134  itkSetMacro( UseOpenMP, bool );
135 
136 protected:
137 
140  void PrintSelf( std::ostream & os, Indent indent ) const override;
141 
142  // made protected so subclass can access
143  double m_Value;
148 
149  bool m_Stop;
150  unsigned long m_NumberOfIterations;
151  unsigned long m_CurrentIteration;
152 
153 private:
154 
155  GradientDescentOptimizer2( const Self & ); // purposely not implemented
156  void operator=( const Self & ); // purposely not implemented
157 
159 
160 };
161 
162 } // end namespace itk
163 
164 #endif
Implement a gradient descent optimizer.
ScaledSingleValuedNonLinearOptimizer Superclass
Superclass::ScaledCostFunctionType ScaledCostFunctionType
virtual void AdvanceOneStep(void)
void PrintSelf(std::ostream &os, Indent indent) const override
virtual void ResumeOptimization(void)
Superclass::ScaledCostFunctionPointer ScaledCostFunctionPointer
virtual void MetricErrorResponse(ExceptionObject &err)
Superclass::DerivativeType DerivativeType
virtual void StopOptimization(void)
GradientDescentOptimizer2(const Self &)
void StartOptimization(void) override
void operator=(const Self &)
Superclass::CostFunctionType CostFunctionType
Superclass::ParametersType ParametersType


Generated on OURCE_DATE_EPOCH for elastix by doxygen 1.9.1 elastix logo