ITK  4.9.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 
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 
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 
135 
138 
139 private:
140  GradientDescentLineSearchOptimizerv4Template( const Self & ) ITK_DELETE_FUNCTION;
141  void operator=( const Self& ) ITK_DELETE_FUNCTION;
142 
143 };
144 
146 typedef GradientDescentLineSearchOptimizerv4Template<double> GradientDescentLineSearchOptimizerv4;
147 
148 } // end namespace itk
149 
150 #ifndef ITK_MANUAL_INSTANTIATION
151 #include "itkGradientDescentLineSearchOptimizerv4.hxx"
152 #endif
153 
154 #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
TInternalComputationValueType GoldenSectionSearch(TInternalComputationValueType a, TInternalComputationValueType b, TInternalComputationValueType c)
GradientDescentOptimizerv4Template< TInternalComputationValueType > Superclass
Class which monitors convergence during the course of optimization.
Control indentation during Print() invocation.
Definition: itkIndent.h:49
virtual void PrintSelf(std::ostream &os, Indent indent) const override
Gradient descent optimizer with a golden section line search.