ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkGradientDescentLineSearchOptimizerv4.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright NumFOCUS
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 * https://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
25namespace itk
26{
59template <typename TInternalComputationValueType>
61 : public GradientDescentOptimizerv4Template<TInternalComputationValueType>
62{
63public:
64 ITK_DISALLOW_COPY_AND_MOVE(GradientDescentLineSearchOptimizerv4Template);
66
72
74 itkOverrideGetNameOfClassMacro(GradientDescentLineSearchOptimizerv4Template);
75
77 itkNewMacro(Self);
78
80 using InternalComputationValueType = TInternalComputationValueType;
81
83 using typename Superclass::DerivativeType;
84
86 using typename Superclass::MeasureType;
87 using typename Superclass::ParametersType;
88
91
95 itkSetMacro(Epsilon, TInternalComputationValueType);
96 itkGetMacro(Epsilon, TInternalComputationValueType);
98
108 itkSetMacro(LowerLimit, TInternalComputationValueType);
109 itkGetMacro(LowerLimit, TInternalComputationValueType);
110 itkSetMacro(UpperLimit, TInternalComputationValueType);
111 itkGetMacro(UpperLimit, TInternalComputationValueType);
112 itkSetMacro(MaximumLineSearchIterations, unsigned int);
113 itkGetMacro(MaximumLineSearchIterations, unsigned int);
115
116protected:
119 void
120 AdvanceOneStep() override;
121
124
127
128 void
129 PrintSelf(std::ostream & os, Indent indent) const override;
130
139 TInternalComputationValueType
140 GoldenSectionSearch(TInternalComputationValueType a,
141 TInternalComputationValueType b,
142 TInternalComputationValueType c,
143 TInternalComputationValueType metricb = NumericTraits<TInternalComputationValueType>::max());
145
146 TInternalComputationValueType m_LowerLimit{};
147 TInternalComputationValueType m_UpperLimit{};
148 TInternalComputationValueType m_Phi{};
149 TInternalComputationValueType m_Resphi{};
150 TInternalComputationValueType m_Epsilon{};
151
154
157};
158
161
162} // end namespace itk
163
164#ifndef ITK_MANUAL_INSTANTIATION
165# include "itkGradientDescentLineSearchOptimizerv4.hxx"
166#endif
167
168#endif
Class which monitors convergence during the course of optimization.
Gradient descent optimizer with a golden section line search.
~GradientDescentLineSearchOptimizerv4Template() override=default
void PrintSelf(std::ostream &os, Indent indent) const override
itk::Function::WindowConvergenceMonitoringFunction< TInternalComputationValueType > ConvergenceMonitoringType
GradientDescentOptimizerv4Template< TInternalComputationValueType > Superclass
TInternalComputationValueType GoldenSectionSearch(TInternalComputationValueType a, TInternalComputationValueType b, TInternalComputationValueType c, TInternalComputationValueType metricb=NumericTraits< TInternalComputationValueType >::max())
OptimizerParameters< TInternalComputationValueType > ParametersType
typename MetricType::DerivativeType DerivativeType
Control indentation during Print() invocation.
Definition itkIndent.h:50
static constexpr T max(const T &)
Implements transparent reference counting.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
GradientDescentLineSearchOptimizerv4Template< double > GradientDescentLineSearchOptimizerv4