18 #ifndef itkPowellOptimizerv4_h
19 #define itkPowellOptimizerv4_h
59 template <
typename TInternalComputationValueType>
81 itkSetMacro(MaximumIteration,
unsigned int);
82 itkGetConstReferenceMacro(MaximumIteration,
unsigned int);
86 itkSetMacro(MaximumLineIteration,
unsigned int);
87 itkGetConstMacro(MaximumLineIteration,
unsigned int);
92 itkSetMacro(StepLength,
double);
93 itkGetConstReferenceMacro(StepLength,
double);
98 itkSetMacro(StepTolerance,
double);
99 itkGetConstReferenceMacro(StepTolerance,
double);
105 itkSetMacro(ValueTolerance,
double);
106 itkGetConstReferenceMacro(ValueTolerance,
double);
110 itkGetConstReferenceMacro(CurrentCost,
MeasureType);
114 return this->GetCurrentCost();
119 itkGetConstReferenceMacro(CurrentLineIteration,
unsigned int);
123 StartOptimization(
bool doOnlyInitialization =
false)
override;
134 itkGetConstReferenceMacro(CatchGetValueException,
bool);
135 itkSetMacro(CatchGetValueException,
bool);
137 itkGetConstReferenceMacro(MetricWorstPossibleValue,
double);
138 itkSetMacro(MetricWorstPossibleValue,
double);
141 GetStopConditionDescription()
const override;
148 PrintSelf(std::ostream & os,
Indent indent)
const override;
150 itkSetMacro(CurrentCost,
double);
155 SetLine(
const ParametersType & origin,
const vnl_vector<double> & direction);
161 GetLineValue(
double x)
const;
164 GetLineValue(
double x, ParametersType & tempCoord)
const;
169 SetCurrentLinePoint(
double x,
double fx);
174 Swap(
double * a,
double * b)
const;
179 Shift(
double * a,
double * b,
double * c,
double d)
const;
191 LineBracket(
double * x1,
double * x2,
double * x3,
double * f1,
double * f2,
double * f3);
194 LineBracket(
double * x1,
double * x2,
double * x3,
double * f1,
double * f2,
double * f3, ParametersType & tempCoord);
202 BracketedLineOptimize(
double ax,
206 double functionValueOfb,
212 BracketedLineOptimize(
double ax,
216 double functionValueOfb,
220 ParametersType & tempCoord);
222 itkGetMacro(SpaceDimension,
unsigned int);
226 this->m_SpaceDimension = dim;
227 this->m_LineDirection.set_size(dim);
228 this->m_LineOrigin.set_size(dim);
229 this->m_CurrentPosition.set_size(dim);
233 itkSetMacro(CurrentIteration,
unsigned int);
235 itkGetMacro(Stop,
bool);
236 itkSetMacro(Stop,
bool);
239 unsigned int m_SpaceDimension{ 0 };
242 unsigned int m_CurrentLineIteration{ 0 };
245 unsigned int m_MaximumIteration{ 100 };
246 unsigned int m_MaximumLineIteration{ 100 };
248 bool m_CatchGetValueException{
false };
249 double m_MetricWorstPossibleValue{ 0 };
252 double m_StepLength{ 0 };
253 double m_StepTolerance{ 0 };
258 double m_ValueTolerance{ 0 };
267 bool m_Stop{
false };
275 #ifndef ITK_MANUAL_INSTANTIATION
276 # include "itkPowellOptimizerv4.hxx"