18 #ifndef itkPowellOptimizerv4_h
19 #define itkPowellOptimizerv4_h
58 template<
typename TInternalComputationValueType>
80 itkSetMacro(MaximumIteration,
unsigned int);
81 itkGetConstReferenceMacro(MaximumIteration,
unsigned int);
85 itkSetMacro(MaximumLineIteration,
unsigned int);
86 itkGetConstMacro(MaximumLineIteration,
unsigned int);
91 itkSetMacro(StepLength,
double);
92 itkGetConstReferenceMacro(StepLength,
double);
97 itkSetMacro(StepTolerance,
double);
98 itkGetConstReferenceMacro(StepTolerance,
double);
104 itkSetMacro(ValueTolerance,
double);
105 itkGetConstReferenceMacro(ValueTolerance,
double);
109 itkGetConstReferenceMacro(CurrentCost,
MeasureType);
114 itkGetConstReferenceMacro(CurrentLineIteration,
unsigned int);
125 itkGetConstReferenceMacro(CatchGetValueException,
bool);
126 itkSetMacro(CatchGetValueException,
bool);
128 itkGetConstReferenceMacro(MetricWorstPossibleValue,
double);
129 itkSetMacro(MetricWorstPossibleValue,
double);
135 PowellOptimizerv4(const PowellOptimizerv4 &);
136 virtual ~PowellOptimizerv4();
137 virtual
void PrintSelf(std::ostream & os,
Indent indent) const ITK_OVERRIDE;
139 itkSetMacro(CurrentCost,
double);
144 const vnl_vector<
double > & direction);
159 void Swap(
double *a,
double *b) const;
163 void Shift(
double *a,
double *b,
double *c,
double d) const;
174 virtual
void LineBracket(
double *ax,
double *bx,
double *cx,
175 double *fa,
double *fb,
double *fc);
177 virtual
void LineBracket(
double *ax,
double *bx,
double *cx,
178 double *fa,
double *fb,
double *fc,
187 double fa,
double fb,
double fc,
188 double *extX,
double *extVal);
191 double fa,
double fb,
double fc,
192 double *extX,
double *extVal,
195 itkGetMacro(SpaceDimension,
unsigned int);
205 itkSetMacro(CurrentIteration,
unsigned int);
207 itkGetMacro(Stop,
bool);
208 itkSetMacro(Stop,
bool);
247 #ifndef ITK_MANUAL_INSTANTIATION
248 #include "itkPowellOptimizerv4.hxx"
OptimizerParameters< TInternalComputationValueType > ScalesType
double GetLineValue(double x) const
Light weight base class for most itk classes.
virtual const MeasureType & GetCurrentCost() const
OptimizerParameters< TInternalComputationValueType > ParametersType
Implements Powell optimization using Brent line search.
SmartPointer< Self > Pointer
SmartPointer< const Self > ConstPointer
bool m_CatchGetValueException
MetricType::MeasureType MeasureType
Superclass::MeasureType MeasureType
void SetLine(const ParametersType &origin, const vnl_vector< double > &direction)
virtual const MeasureType & GetValue() const override
virtual void LineBracket(double *ax, double *bx, double *cx, double *fa, double *fb, double *fc)
vnl_vector< double > m_LineDirection
MeasureType m_CurrentCost
ObjectToObjectOptimizerBaseTemplate< TInternalComputationValueType > Superclass
virtual void PrintSelf(std::ostream &os, Indent indent) const override
virtual void StartOptimization(bool doOnlyInitialization=false) override
virtual const std::string GetStopConditionDescription() const override
void SetSpaceDimension(unsigned int dim)
double m_MetricWorstPossibleValue
Superclass::ScalesType ScalesType
std::ostringstream m_StopConditionDescription
void Shift(double *a, double *b, double *c, double d) const
unsigned int m_SpaceDimension
void SetCurrentLinePoint(double x, double fx)
virtual void Modified() const
unsigned int m_MaximumLineIteration
ParametersType m_CurrentPosition
ParametersType m_LineOrigin
Control indentation during Print() invocation.
void Swap(double *a, double *b) const
virtual void BracketedLineOptimize(double ax, double bx, double cx, double fa, double fb, double fc, double *extX, double *extVal)
Abstract base for object-to-object optimizers.
unsigned int m_MaximumIteration
Superclass::ParametersType ParametersType
unsigned int m_CurrentLineIteration