ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkOnePlusOneEvolutionaryOptimizerv4.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 itkOnePlusOneEvolutionaryOptimizerv4_h
19#define itkOnePlusOneEvolutionaryOptimizerv4_h
20
23#include <string>
24
25namespace itk
26{
61
62template <typename TInternalComputationValueType>
63class ITK_TEMPLATE_EXPORT OnePlusOneEvolutionaryOptimizerv4
64 : public ObjectToObjectOptimizerBaseTemplate<TInternalComputationValueType>
65{
66public:
72
74 itkNewMacro(Self);
75
77 itkOverrideGetNameOfClassMacro(OnePlusOneEvolutionaryOptimizerv4);
78
82
85
87 using typename Superclass::MeasureType;
88
90 using typename Superclass::ParametersType;
91
93 using typename Superclass::ScalesType;
94
96 itkSetMacro(MaximumIteration, unsigned int);
97 itkGetConstReferenceMacro(MaximumIteration, unsigned int);
99
101 itkSetMacro(GrowthFactor, double);
102 itkGetConstReferenceMacro(GrowthFactor, double);
104
106 itkSetMacro(ShrinkFactor, double);
107 itkGetConstReferenceMacro(ShrinkFactor, double);
109
111 itkSetMacro(InitialRadius, double);
112 itkGetConstReferenceMacro(InitialRadius, double);
114
117 itkSetMacro(Epsilon, double);
118 itkGetConstReferenceMacro(Epsilon, double);
120
122 itkGetConstReferenceMacro(FrobeniusNorm, double);
123
124 void
126
133 void
134 Initialize(double initialRadius, double grow = -1, double shrink = -1);
135
137 itkGetConstReferenceMacro(CurrentCost, MeasureType);
138 const MeasureType &
139 GetValue() const override;
141
143 itkGetConstReferenceMacro(Initialized, bool);
144
148 void
149 StartOptimization(bool doOnlyInitialization = false) override;
150
154 void
156 {
157 m_Stop = true;
158 }
159
160 itkGetConstReferenceMacro(CatchGetValueException, bool);
161 itkSetMacro(CatchGetValueException, bool);
162 itkBooleanMacro(CatchGetValueException);
163
164 itkGetConstReferenceMacro(MetricWorstPossibleValue, double);
165 itkSetMacro(MetricWorstPossibleValue, double);
166
167 std::string
169
170protected:
174 void
175 PrintSelf(std::ostream & os, Indent indent) const override;
176
177private:
180
182 unsigned int m_MaximumIteration{};
183
186
189 double m_Epsilon{};
190
193
196
199
202
205
210 bool m_Stop{};
211
213 std::ostringstream m_StopConditionDescription{};
214
218}; // end of class
219} // end of namespace itk
220
221#ifndef ITK_MANUAL_INSTANTIATION
222# include "itkOnePlusOneEvolutionaryOptimizerv4.hxx"
223#endif
224
225#endif
Control indentation during Print() invocation.
Definition itkIndent.h:50
void StartOptimization(bool doOnlyInitialization=false) override
OnePlusOneEvolutionaryOptimizerv4(const OnePlusOneEvolutionaryOptimizerv4 &)
const MeasureType & GetValue() const override
void Initialize(double initialRadius, double grow=-1, double shrink=-1)
void SetNormalVariateGenerator(NormalVariateGeneratorType *generator)
Statistics::RandomVariateGeneratorBase NormalVariateGeneratorType
std::string GetStopConditionDescription() const override
~OnePlusOneEvolutionaryOptimizerv4() override=default
ObjectToObjectOptimizerBaseTemplate< TInternalComputationValueType > Superclass
void PrintSelf(std::ostream &os, Indent indent) const override
Implements transparent reference counting.
Defines common interfaces for random variate generators.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
SingleValuedCostFunctionv4Template< double > SingleValuedCostFunctionv4