18 #ifndef __itkPowellOptimizer_h
19 #define __itkPowellOptimizer_h
85 itkSetMacro(Maximize,
bool);
86 itkBooleanMacro(Maximize);
87 itkGetConstReferenceMacro(Maximize,
bool);
91 itkSetMacro(MaximumIteration,
unsigned int);
92 itkGetConstReferenceMacro(MaximumIteration,
unsigned int);
96 itkSetMacro(MaximumLineIteration,
unsigned int);
97 itkGetConstMacro(MaximumLineIteration,
unsigned int);
102 itkSetMacro(StepLength,
double);
103 itkGetConstReferenceMacro(StepLength,
double);
108 itkSetMacro(StepTolerance,
double);
109 itkGetConstReferenceMacro(StepTolerance,
double);
115 itkSetMacro(ValueTolerance,
double);
116 itkGetConstReferenceMacro(ValueTolerance,
double);
120 itkGetConstReferenceMacro(CurrentCost,
MeasureType);
125 itkGetConstReferenceMacro(CurrentIteration,
unsigned int);
128 itkGetConstReferenceMacro(CurrentLineIteration,
unsigned int);
139 itkGetConstReferenceMacro(CatchGetValueException,
bool);
140 itkSetMacro(CatchGetValueException,
bool);
142 itkGetConstReferenceMacro(MetricWorstPossibleValue,
double);
143 itkSetMacro(MetricWorstPossibleValue,
double);
153 itkSetMacro(CurrentCost,
double);
158 const vnl_vector< double > & direction);
173 void Swap(
double *a,
double *b)
const;
177 void Shift(
double *a,
double *b,
double *c,
double d)
const;
188 virtual void LineBracket(
double *ax,
double *bx,
double *cx,
189 double *fa,
double *fb,
double *fc);
191 virtual void LineBracket(
double *ax,
double *bx,
double *cx,
192 double *fa,
double *fb,
double *fc,
201 double fa,
double fb,
double fc,
202 double *extX,
double *extVal);
205 double fa,
double fb,
double fc,
206 double *extX,
double *extVal,
209 itkGetMacro(SpaceDimension,
unsigned int);
219 itkSetMacro(CurrentIteration,
unsigned int);
221 itkGetMacro(Stop,
bool);
222 itkSetMacro(Stop,
bool);
unsigned int m_MaximumIteration
SmartPointer< const Self > ConstPointer
const std::string GetStopConditionDescription() const
virtual void BracketedLineOptimize(double ax, double bx, double cx, double fa, double fb, double fc, double *extX, double *extVal)
This class is a base for the CostFunctions returning a single value.
Light weight base class for most itk classes.
MeasureType m_CurrentCost
MeasureType GetValue() const
virtual const MeasureType & GetCurrentCost()
This class is a base for the Optimization methods that optimize a single valued function.
void PrintSelf(std::ostream &os, Indent indent) const
unsigned int m_MaximumLineIteration
CostFunctionType::Pointer CostFunctionPointer
unsigned int m_SpaceDimension
SingleValuedCostFunction CostFunctionType
std::ostringstream m_StopConditionDescription
bool m_CatchGetValueException
CostFunctionType::MeasureType MeasureType
unsigned int m_CurrentLineIteration
vnl_vector< double > m_LineDirection
Implements Powell optimization using Brent line search.
void Shift(double *a, double *b, double *c, double d) const
void SetLine(const ParametersType &origin, const vnl_vector< double > &direction)
virtual void Modified() const
double m_MetricWorstPossibleValue
ParametersType m_CurrentPosition
SmartPointer< Self > Pointer
SingleValuedNonLinearOptimizer::ParametersType ParametersType
void Swap(double *a, double *b) const
ParametersType m_LineOrigin
SingleValuedNonLinearOptimizer Superclass
void SetSpaceDimension(unsigned int dim)
Control indentation during Print() invocation.
unsigned int m_CurrentIteration
virtual ~PowellOptimizer()
virtual void LineBracket(double *ax, double *bx, double *cx, double *fa, double *fb, double *fc)
double GetLineValue(double x) const
void SetCurrentLinePoint(double x, double fx)