ITK  4.13.0
Insight Segmentation and Registration Toolkit
itkGradientDescentLineSearchOptimizerv4.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
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 itkGradientDescentLineSearchOptimizerv4_h
19 #define itkGradientDescentLineSearchOptimizerv4_h
20 
24 
25 namespace itk
26 {
58 template<typename TInternalComputationValueType>
60 : public GradientDescentOptimizerv4Template<TInternalComputationValueType>
61 {
62 public:
68 
71 
73  itkNewMacro(Self);
74 
76  typedef TInternalComputationValueType InternalComputationValueType;
77 
80 
82  typedef typename Superclass::MeasureType MeasureType;
83  typedef typename Superclass::ParametersType ParametersType;
84 
87 
91  itkSetMacro( Epsilon , TInternalComputationValueType );
92  itkGetMacro( Epsilon , TInternalComputationValueType );
94 
104  itkSetMacro( LowerLimit , TInternalComputationValueType );
105  itkGetMacro( LowerLimit , TInternalComputationValueType );
106  itkSetMacro( UpperLimit , TInternalComputationValueType );
107  itkGetMacro( UpperLimit , TInternalComputationValueType );
108  itkSetMacro( MaximumLineSearchIterations , unsigned int );
109  itkGetMacro( MaximumLineSearchIterations , unsigned int );
111 
112 protected:
115  virtual void AdvanceOneStep(void) ITK_OVERRIDE;
116 
119 
121  virtual ~GradientDescentLineSearchOptimizerv4Template() ITK_OVERRIDE;
122 
123  virtual void PrintSelf( std::ostream & os, Indent indent ) const ITK_OVERRIDE;
124 
125  TInternalComputationValueType GoldenSectionSearch( TInternalComputationValueType a, TInternalComputationValueType b, TInternalComputationValueType c );
126 
127  TInternalComputationValueType m_LowerLimit;
128  TInternalComputationValueType m_UpperLimit;
129  TInternalComputationValueType m_Phi;
130  TInternalComputationValueType m_Resphi;
131  TInternalComputationValueType m_Epsilon;
132 
134  unsigned int m_MaximumLineSearchIterations;
135 
137  unsigned int m_LineSearchIterations;
138 
139 private:
140  ITK_DISALLOW_COPY_AND_ASSIGN(GradientDescentLineSearchOptimizerv4Template);
141 
142 };
143 
145 typedef GradientDescentLineSearchOptimizerv4Template<double> GradientDescentLineSearchOptimizerv4;
146 
147 } // end namespace itk
148 
149 #ifndef ITK_MANUAL_INSTANTIATION
150 #include "itkGradientDescentLineSearchOptimizerv4.hxx"
151 #endif
152 
153 #endif
Array class with size defined at construction time.
Definition: itkArray.h:50
Light weight base class for most itk classes.
itk::Function::WindowConvergenceMonitoringFunction< TInternalComputationValueType > ConvergenceMonitoringType
GradientDescentOptimizerv4Template< TInternalComputationValueType > Superclass
Class which monitors convergence during the course of optimization.
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Gradient descent optimizer with a golden section line search.