Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itk::PowellOptimizer Class Reference
[NumericsOptimizers]

Implements Powell optimization using Brent line search - adapted from Numerical Recipes in C (first edition). More...

#include <itkPowellOptimizer.h>

Inheritance diagram for itk::PowellOptimizer:

Inheritance graph
[legend]
Collaboration diagram for itk::PowellOptimizer:

Collaboration graph
[legend]
List of all members.

Public Types

typedef PowellOptimizer Self
typedef SingleValuedNonLinearOptimizer Superclass
typedef SmartPointer< SelfPointer
typedef SmartPointer< const
Self
ConstPointer
typedef SingleValuedNonLinearOptimizer::ParametersType ParametersType
typedef SingleValuedCostFunction CostFunctionType
typedef CostFunctionType::Pointer CostFunctionPointer

Public Member Functions

virtual const char * GetNameOfClass () const
virtual const unsigned int & GetCurrentIteration ()
virtual const unsigned int & GetCurrentLineIteration ()
void StartOptimization ()
void StopOptimization ()
virtual void SetMaximize (bool _arg)
virtual const bool & GetMaximize ()
virtual void SetMaximumIteration (unsigned int _arg)
virtual const unsigned int & GetMaximumIteration ()
virtual void SetMaximumLineIteration (unsigned int _arg)
virtual unsigned int GetMaximumLineIteration () const
virtual void SetStepLength (double _arg)
virtual const double & GetStepLength ()
virtual void SetStepTolerance (double _arg)
virtual const double & GetStepTolerance ()
virtual void SetValueTolerance (double _arg)
virtual const double & GetValueTolerance ()
virtual const MeasureTypeGetCurrentCost ()
MeasureType GetValue () const

Static Public Member Functions

Pointer New ()

Protected Member Functions

 PowellOptimizer ()
 PowellOptimizer (const PowellOptimizer &)
virtual ~PowellOptimizer ()
void PrintSelf (std::ostream &os, Indent indent) const
virtual void SetCurrentCost (double _arg)
void SetLine (const ParametersType &origin, const vnl_vector< double > &direction)
double GetLineValue (double x) const
void SetCurrentLinePoint (double x, double fx)
void Swap (double *a, double *b) const
void Shift (double *a, double *b, double *c, double d) const
virtual void LineBracket (double *ax, double *bx, double *cx, double *fa, double *fb, double *fc)
virtual void BracketedLineOptimize (double ax, double bx, double cx, double fa, double fb, double fc, double *extX, double *extVal)
virtual unsigned int GetSpaceDimension ()
virtual void SetSpaceDimension (unsigned int _arg)
virtual void SetCurrentIteration (unsigned int _arg)
virtual bool GetStop ()
virtual void SetStop (bool _arg)

Detailed Description

Implements Powell optimization using Brent line search - adapted from Numerical Recipes in C (first edition).

This optimizer needs a cost function. Partial derivatives of that function are not required.

For an N-dimensional parameter space, each iteration minimizes(maximizes) the function in N (initially orthogonal) directions. Typically only 2-5 iterations are required. If gradients are available, consider a conjugate gradient line search strategy.

The SetStepLength determines the initial distance to step in a line direction when bounding the minimum (using bracketing triple spaced using a golden search strategy).

The StepTolerance terminates optimization when the parameter values are known to be within this (scaled) distance of the local extreme.

The ValueTolerance terminates optimization when the cost function values at the current parameters and at the local extreme are likely (within a second order approximation) to be within this is tolerance.

Definition at line 54 of file itkPowellOptimizer.h.


Member Typedef Documentation

typedef SmartPointer<const Self> itk::PowellOptimizer::ConstPointer
 

Reimplemented from itk::SingleValuedNonLinearOptimizer.

Reimplemented in itk::FRPROptimizer.

Definition at line 62 of file itkPowellOptimizer.h.

typedef CostFunctionType::Pointer itk::PowellOptimizer::CostFunctionPointer
 

Reimplemented from itk::SingleValuedNonLinearOptimizer.

Reimplemented in itk::FRPROptimizer.

Definition at line 75 of file itkPowellOptimizer.h.

typedef SingleValuedCostFunction itk::PowellOptimizer::CostFunctionType
 

Type of the Cost Function

Reimplemented from itk::SingleValuedNonLinearOptimizer.

Reimplemented in itk::FRPROptimizer.

Definition at line 74 of file itkPowellOptimizer.h.

typedef SingleValuedNonLinearOptimizer::ParametersType itk::PowellOptimizer::ParametersType
 

Parameters type. It defines a position in the optimization search space.

Reimplemented from itk::SingleValuedNonLinearOptimizer.

Reimplemented in itk::FRPROptimizer.

Definition at line 65 of file itkPowellOptimizer.h.

Referenced by StopOptimization().

typedef SmartPointer<Self> itk::PowellOptimizer::Pointer
 

Reimplemented from itk::SingleValuedNonLinearOptimizer.

Reimplemented in itk::FRPROptimizer.

Definition at line 61 of file itkPowellOptimizer.h.

typedef PowellOptimizer itk::PowellOptimizer::Self
 

Standard "Self" typedef.

Reimplemented from itk::SingleValuedNonLinearOptimizer.

Reimplemented in itk::FRPROptimizer.

Definition at line 59 of file itkPowellOptimizer.h.

typedef SingleValuedNonLinearOptimizer itk::PowellOptimizer::Superclass
 

Reimplemented from itk::SingleValuedNonLinearOptimizer.

Reimplemented in itk::FRPROptimizer.

Definition at line 60 of file itkPowellOptimizer.h.


Constructor & Destructor Documentation

itk::PowellOptimizer::PowellOptimizer  )  [protected]
 

itk::PowellOptimizer::PowellOptimizer const PowellOptimizer  )  [protected]
 

virtual itk::PowellOptimizer::~PowellOptimizer  )  [protected, virtual]
 


Member Function Documentation

virtual void itk::PowellOptimizer::BracketedLineOptimize double  ax,
double  bx,
double  cx,
double  fa,
double  fb,
double  fc,
double *  extX,
double *  extVal
[protected, virtual]
 

Given a bracketing triple of points and their function values, returns a bounded extreme. These values are in parameter space, along the current line and wrt the current origin set via SetLine. Optimization terminates based on MaximumIteration, StepTolerance, or ValueTolerance. Implemented as Brent line optimers from NRC.

virtual const MeasureType& itk::PowellOptimizer::GetCurrentCost  )  [virtual]
 

Return Current Value

virtual const unsigned int& itk::PowellOptimizer::GetCurrentIteration  )  [virtual]
 

Return Current Iteration

virtual const unsigned int& itk::PowellOptimizer::GetCurrentLineIteration  )  [virtual]
 

Get the current line search iteration

double itk::PowellOptimizer::GetLineValue double  x  )  const [protected]
 

Get the value of the n-dimensional cost function at this scalar step distance along the current line direction from the current line origin. Line origin and distances are set via SetLine

virtual const bool& itk::PowellOptimizer::GetMaximize  )  [virtual]
 

Set if the Optimizer should Maximize the metric

virtual const unsigned int& itk::PowellOptimizer::GetMaximumIteration  )  [virtual]
 

Set/Get maximum iteration limit.

virtual unsigned int itk::PowellOptimizer::GetMaximumLineIteration  )  const [virtual]
 

Set/Get the maximum number of line search iterations

virtual const char* itk::PowellOptimizer::GetNameOfClass  )  const [virtual]
 

Run-time type information (and related methods).

Reimplemented from itk::SingleValuedNonLinearOptimizer.

Reimplemented in itk::FRPROptimizer.

virtual unsigned int itk::PowellOptimizer::GetSpaceDimension  )  [protected, virtual]
 

virtual const double& itk::PowellOptimizer::GetStepLength  )  [virtual]
 

Set/Get StepLength for the (scaled) spacing of the sampling of parameter space while bracketing the extremum

virtual const double& itk::PowellOptimizer::GetStepTolerance  )  [virtual]
 

Set/Get StepTolerance. Once the local extreme is known to be within this distance of the current parameter values, optimization terminates

virtual bool itk::PowellOptimizer::GetStop  )  [protected, virtual]
 

MeasureType itk::PowellOptimizer::GetValue  )  const [inline]
 

Return Current Value

Definition at line 113 of file itkPowellOptimizer.h.

virtual const double& itk::PowellOptimizer::GetValueTolerance  )  [virtual]
 

Set/Get ValueTolerance. Once this current cost function value is known to be within this tolerance of the cost function value at the local extreme, optimization terminates

virtual void itk::PowellOptimizer::LineBracket double *  ax,
double *  bx,
double *  cx,
double *  fa,
double *  fb,
double *  fc
[protected, virtual]
 

The LineBracket routine from NRC. Uses current origin and line direction (from SetLine) to find a triple of points (ax, bx, cx) that bracket the extreme "near" the origin. Search first considers the point StepLength distance from ax. IMPORTANT: The value of ax and the value of the function at ax (i.e., fa), must both be provided to this function.

Pointer itk::PowellOptimizer::New  )  [static]
 

Method for creation through the object factory.

Reimplemented from itk::SingleValuedNonLinearOptimizer.

Reimplemented in itk::FRPROptimizer.

void itk::PowellOptimizer::PrintSelf std::ostream &  os,
Indent  indent
const [protected, virtual]
 

Methods invoked by Print() to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from itk::SingleValuedNonLinearOptimizer.

Reimplemented in itk::FRPROptimizer.

virtual void itk::PowellOptimizer::SetCurrentCost double  _arg  )  [protected, virtual]
 

virtual void itk::PowellOptimizer::SetCurrentIteration unsigned int  _arg  )  [protected, virtual]
 

void itk::PowellOptimizer::SetCurrentLinePoint double  x,
double  fx
[protected]
 

Set the given scalar step distance (x) and function value (fx) as the "best-so-far" optimizer values.

void itk::PowellOptimizer::SetLine const ParametersType origin,
const vnl_vector< double > &  direction
[protected]
 

Used to specify the line direction through the n-dimensional parameter space the is currently being bracketed and optimized.

virtual void itk::PowellOptimizer::SetMaximize bool  _arg  )  [virtual]
 

Set if the Optimizer should Maximize the metric

virtual void itk::PowellOptimizer::SetMaximumIteration unsigned int  _arg  )  [virtual]
 

Set/Get maximum iteration limit.

virtual void itk::PowellOptimizer::SetMaximumLineIteration unsigned int  _arg  )  [virtual]
 

Set/Get the maximum number of line search iterations

virtual void itk::PowellOptimizer::SetSpaceDimension unsigned int  _arg  )  [protected, virtual]
 

virtual void itk::PowellOptimizer::SetStepLength double  _arg  )  [virtual]
 

Set/Get StepLength for the (scaled) spacing of the sampling of parameter space while bracketing the extremum

virtual void itk::PowellOptimizer::SetStepTolerance double  _arg  )  [virtual]
 

Set/Get StepTolerance. Once the local extreme is known to be within this distance of the current parameter values, optimization terminates

virtual void itk::PowellOptimizer::SetStop bool  _arg  )  [protected, virtual]
 

virtual void itk::PowellOptimizer::SetValueTolerance double  _arg  )  [virtual]
 

Set/Get ValueTolerance. Once this current cost function value is known to be within this tolerance of the cost function value at the local extreme, optimization terminates

void itk::PowellOptimizer::Shift double *  a,
double *  b,
double *  c,
double  d
const [protected]
 

Used in bracketing the extreme along the current line. Adapted from NRC

void itk::PowellOptimizer::StartOptimization  )  [virtual]
 

Start optimization.

Reimplemented from itk::Optimizer.

Reimplemented in itk::FRPROptimizer.

void itk::PowellOptimizer::StopOptimization void   )  [inline]
 

When users call StartOptimization, this value will be set false. By calling StopOptimization, this flag will be set true, and optimization will stop at the next iteration.

Definition at line 128 of file itkPowellOptimizer.h.

References ParametersType.

void itk::PowellOptimizer::Swap double *  a,
double *  b
const [protected]
 

Used in bracketing the extreme along the current line. Adapted from NRC


The documentation for this class was generated from the following file:
Generated at Thu May 25 02:08:11 2006 for ITK by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2000