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);
65
71
73 itkOverrideGetNameOfClassMacro(GradientDescentLineSearchOptimizerv4Template);
74
76 itkNewMacro(Self);
77
79 using InternalComputationValueType = TInternalComputationValueType;
80
82 using typename Superclass::DerivativeType;
83
85 using typename Superclass::MeasureType;
86 using typename Superclass::ParametersType;
87
90
95 itkSetMacro(Epsilon, TInternalComputationValueType);
96 itkGetMacro(Epsilon, TInternalComputationValueType);
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);
115protected:
118 void
119 AdvanceOneStep() override;
120
123
126
127 void
128 PrintSelf(std::ostream & os, Indent indent) const override;
129
138 TInternalComputationValueType
139 GoldenSectionSearch(TInternalComputationValueType a,
140 TInternalComputationValueType b,
141 TInternalComputationValueType c,
142 TInternalComputationValueType metricb = NumericTraits<TInternalComputationValueType>::max());
143
144 TInternalComputationValueType m_LowerLimit{};
145 TInternalComputationValueType m_UpperLimit{};
146 TInternalComputationValueType m_Phi{};
147 TInternalComputationValueType m_Resphi{};
148 TInternalComputationValueType m_Epsilon{};
149
152
155};
156
159
160} // end namespace itk
161
162#ifndef ITK_MANUAL_INSTANTIATION
163# include "itkGradientDescentLineSearchOptimizerv4.hxx"
164#endif
165
166#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