ANIMA  4.0
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
anima::BobyqaOptimizer Class Reference

BOBYQA Optimizer. More...

#include <animaBobyqaOptimizer.h>

+ Inheritance diagram for anima::BobyqaOptimizer:
+ Collaboration diagram for anima::BobyqaOptimizer:

Public Types

typedef itk::SmartPointer< const SelfConstPointer
 
typedef CostFunctionType::Pointer CostFunctionPointer
 
typedef itk::SingleValuedCostFunction CostFunctionType
 
typedef itk::SingleValuedNonLinearOptimizer::ParametersType ParametersType
 
typedef itk::SmartPointer< SelfPointer
 
typedef itk::SingleValuedNonLinearOptimizer::ScalesType ScalesType
 
typedef BobyqaOptimizer Self
 
typedef itk::Object Superclass
 

Public Member Functions

virtual ::itk::LightObject::Pointer CreateAnother (void) const
 
virtual const bool & GetCatchGetValueException () const
 
virtual const MeasureType & GetCurrentCost () const
 
virtual const unsigned int & GetCurrentIteration () const
 
virtual const bool & GetMaximize () const
 
virtual const unsigned int & GetMaximumIteration () const
 
virtual const double & GetMetricWorstPossibleValue () const
 
virtual const char * GetNameOfClass () const
 
virtual const unsigned int & GetNumberSamplingPoints () const
 
virtual const double & GetRhoBegin () const
 
virtual const double & GetRhoEnd () const
 
virtual const unsigned int & GetSpaceDimension () const
 
const std::string GetStopConditionDescription () const ITK_OVERRIDE
 
MeasureType GetValue () const
 
virtual void MaximizeOff ()
 
virtual void MaximizeOn ()
 
virtual void SetCatchGetValueException (bool _arg)
 
virtual void SetLowerBounds (ScalesType _arg)
 
virtual void SetMaximize (bool _arg)
 
virtual void SetMaximumIteration (unsigned int _arg)
 
virtual void SetMetricWorstPossibleValue (double _arg)
 
virtual void SetNumberSamplingPoints (unsigned int _arg)
 
virtual void SetRhoBegin (double _arg)
 
virtual void SetRhoEnd (double _arg)
 
virtual void SetSpaceDimension (unsigned int _arg)
 
virtual void SetUpperBounds (ScalesType _arg)
 
void StartOptimization () ITK_OVERRIDE
 
void StopOptimization ()
 

Static Public Member Functions

static Pointer New ()
 

Protected Member Functions

int altmov_ (long int &npt, double *xpt, double *xopt, double *bmat, double *zmat, long int &ndim, double *sl, double *su, long int &kopt, long int &knew, double *adelt, double *xnew, double *xalt, double *alpha, double *cauchy, double *glag, double *hcol, double *w)
 
 BobyqaOptimizer ()
 
 BobyqaOptimizer (const BobyqaOptimizer &)
 
int bobyqb_ (long int &npt, double *x, double *xl, double *xu, double &rhobeg, double &rhoend, long int &maxfun, double *xbase, double *xpt, double *fval, double *xopt, double *gopt, double *hq, double *pq, double *bmat, double *zmat, long int &ndim, double *sl, double *su, double *xnew, double *xalt, double *d__, double *vlag, double *w)
 
int optimize (long int &npt, double *x, double *xl, double *xu, double &rhobeg, double &rhoend, long int &maxfun, double *w)
 
int prelim_ (long int &npt, double *x, double *xl, double *xu, double &rhobeg, long int &maxfun, double *xbase, double *xpt, double *fval, double *gopt, double *hq, double *pq, double *bmat, double *zmat, long int &ndim, double *sl, double *su, long int &nf, long int &kopt)
 
void PrintSelf (std::ostream &os, itk::Indent indent) const ITK_OVERRIDE
 
int rescue_ (long int &npt, double *xl, double *xu, long int &maxfun, double *xbase, double *xpt, double *fval, double *xopt, double *gopt, double *hq, double *pq, double *bmat, double *zmat, long int &ndim, double *sl, double *su, long int &nf, double *delta, long int &kopt, double *vlag, double *ptsaux, double *ptsid, double *w)
 
virtual void SetCurrentCost (double _arg)
 
int trsbox_ (long int &npt, double *xpt, double *xopt, double *gopt, double *hq, double *pq, double *sl, double *su, double *delta, double *xnew, double *d__, double *gnew, double *xbdi, double *s, double *hs, double *hred, double *dsq, double *crvmin)
 
int update_ (long int &npt, double *bmat, double *zmat, long int &ndim, double *vlag, double *beta, double *denom, long int &knew, double *w)
 
virtual ~BobyqaOptimizer ()
 

Protected Attributes

bool m_CatchGetValueException
 
MeasureType m_CurrentCost
 
unsigned int m_CurrentIteration
 
ScalesType m_LowerBounds
 
bool m_Maximize
 
unsigned int m_MaximumIteration
 
double m_MetricWorstPossibleValue
 
unsigned int m_NumberSamplingPoints
 
double m_RhoBegin
 
double m_RhoEnd
 
unsigned int m_SpaceDimension
 
bool m_Stop
 
std::ostringstream m_StopConditionDescription
 
ScalesType m_UpperBounds
 
BobyqaOptimizer::ParametersType px
 

Detailed Description

BOBYQA Optimizer.

Definition at line 15 of file animaBobyqaOptimizer.h.

Member Typedef Documentation

◆ ConstPointer

typedef itk::SmartPointer<const Self> anima::BobyqaOptimizer::ConstPointer

Definition at line 22 of file animaBobyqaOptimizer.h.

◆ CostFunctionPointer

typedef CostFunctionType::Pointer anima::BobyqaOptimizer::CostFunctionPointer

Definition at line 35 of file animaBobyqaOptimizer.h.

◆ CostFunctionType

typedef itk::SingleValuedCostFunction anima::BobyqaOptimizer::CostFunctionType

Type of the Cost Function

Definition at line 34 of file animaBobyqaOptimizer.h.

◆ ParametersType

typedef itk::SingleValuedNonLinearOptimizer::ParametersType anima::BobyqaOptimizer::ParametersType

Definition at line 24 of file animaBobyqaOptimizer.h.

◆ Pointer

typedef itk::SmartPointer<Self> anima::BobyqaOptimizer::Pointer

Definition at line 21 of file animaBobyqaOptimizer.h.

◆ ScalesType

typedef itk::SingleValuedNonLinearOptimizer::ScalesType anima::BobyqaOptimizer::ScalesType

Definition at line 25 of file animaBobyqaOptimizer.h.

◆ Self

Standard class typedefs.

Definition at line 19 of file animaBobyqaOptimizer.h.

◆ Superclass

Definition at line 20 of file animaBobyqaOptimizer.h.

Constructor & Destructor Documentation

◆ BobyqaOptimizer() [1/2]

anima::BobyqaOptimizer::BobyqaOptimizer ( )
protected

Definition at line 13 of file animaBobyqaOptimizer.cxx.

References ~BobyqaOptimizer().

◆ BobyqaOptimizer() [2/2]

anima::BobyqaOptimizer::BobyqaOptimizer ( const BobyqaOptimizer )
protected

◆ ~BobyqaOptimizer()

anima::BobyqaOptimizer::~BobyqaOptimizer ( )
protectedvirtual

Definition at line 32 of file animaBobyqaOptimizer.cxx.

References StartOptimization().

Referenced by BobyqaOptimizer().

Member Function Documentation

◆ altmov_()

int anima::BobyqaOptimizer::altmov_ ( long int &  npt,
double *  xpt,
double *  xopt,
double *  bmat,
double *  zmat,
long int &  ndim,
double *  sl,
double *  su,
long int &  kopt,
long int &  knew,
double *  adelt,
double *  xnew,
double *  xalt,
double *  alpha,
double *  cauchy,
double *  glag,
double *  hcol,
double *  w 
)
protected

Definition at line 1432 of file animaBobyqaOptimizer.cxx.

References m_SpaceDimension.

◆ bobyqb_()

int anima::BobyqaOptimizer::bobyqb_ ( long int &  npt,
double *  x,
double *  xl,
double *  xu,
double &  rhobeg,
double &  rhoend,
long int &  maxfun,
double *  xbase,
double *  xpt,
double *  fval,
double *  xopt,
double *  gopt,
double *  hq,
double *  pq,
double *  bmat,
double *  zmat,
long int &  ndim,
double *  sl,
double *  su,
double *  xnew,
double *  xalt,
double *  d__,
double *  vlag,
double *  w 
)
protected

Definition at line 286 of file animaBobyqaOptimizer.cxx.

Referenced by optimize().

◆ CreateAnother()

virtual::itk::LightObject::Pointer anima::BobyqaOptimizer::CreateAnother ( void  ) const

◆ GetCatchGetValueException()

virtual const bool& anima::BobyqaOptimizer::GetCatchGetValueException ( ) const
virtual

◆ GetCurrentCost()

virtual const MeasureType& anima::BobyqaOptimizer::GetCurrentCost ( ) const
virtual

Return Current Value

◆ GetCurrentIteration()

virtual const unsigned int& anima::BobyqaOptimizer::GetCurrentIteration ( ) const
virtual

Return Current Iteration

◆ GetMaximize()

virtual const bool& anima::BobyqaOptimizer::GetMaximize ( ) const
virtual

◆ GetMaximumIteration()

virtual const unsigned int& anima::BobyqaOptimizer::GetMaximumIteration ( ) const
virtual

◆ GetMetricWorstPossibleValue()

virtual const double& anima::BobyqaOptimizer::GetMetricWorstPossibleValue ( ) const
virtual

◆ GetNameOfClass()

virtual const char* anima::BobyqaOptimizer::GetNameOfClass ( ) const
virtual

Run-time type information (and related methods).

◆ GetNumberSamplingPoints()

virtual const unsigned int& anima::BobyqaOptimizer::GetNumberSamplingPoints ( ) const
virtual

◆ GetRhoBegin()

virtual const double& anima::BobyqaOptimizer::GetRhoBegin ( ) const
virtual

◆ GetRhoEnd()

virtual const double& anima::BobyqaOptimizer::GetRhoEnd ( ) const
virtual

◆ GetSpaceDimension()

virtual const unsigned int& anima::BobyqaOptimizer::GetSpaceDimension ( ) const
virtual

◆ GetStopConditionDescription()

const std::string anima::BobyqaOptimizer::GetStopConditionDescription ( ) const

Definition at line 105 of file animaBobyqaOptimizer.cxx.

References PrintSelf().

Referenced by StartOptimization().

◆ GetValue()

MeasureType anima::BobyqaOptimizer::GetValue ( ) const
inline

Definition at line 65 of file animaBobyqaOptimizer.h.

◆ MaximizeOff()

virtual void anima::BobyqaOptimizer::MaximizeOff ( )
virtual

◆ MaximizeOn()

virtual void anima::BobyqaOptimizer::MaximizeOn ( )
virtual

◆ New()

static Pointer anima::BobyqaOptimizer::New ( )
static

Method for creation through the object factory.

◆ optimize()

int anima::BobyqaOptimizer::optimize ( long int &  npt,
double *  x,
double *  xl,
double *  xu,
double &  rhobeg,
double &  rhoend,
long int &  maxfun,
double *  w 
)
protected

Definition at line 132 of file animaBobyqaOptimizer.cxx.

References bobyqb_().

Referenced by PrintSelf().

◆ prelim_()

int anima::BobyqaOptimizer::prelim_ ( long int &  npt,
double *  x,
double *  xl,
double *  xu,
double &  rhobeg,
long int &  maxfun,
double *  xbase,
double *  xpt,
double *  fval,
double *  gopt,
double *  hq,
double *  pq,
double *  bmat,
double *  zmat,
long int &  ndim,
double *  sl,
double *  su,
long int &  nf,
long int &  kopt 
)
protected

◆ PrintSelf()

void anima::BobyqaOptimizer::PrintSelf ( std::ostream &  os,
itk::Indent  indent 
) const
protected

Definition at line 115 of file animaBobyqaOptimizer.cxx.

References optimize().

Referenced by GetStopConditionDescription().

◆ rescue_()

int anima::BobyqaOptimizer::rescue_ ( long int &  npt,
double *  xl,
double *  xu,
long int &  maxfun,
double *  xbase,
double *  xpt,
double *  fval,
double *  xopt,
double *  gopt,
double *  hq,
double *  pq,
double *  bmat,
double *  zmat,
long int &  ndim,
double *  sl,
double *  su,
long int &  nf,
double *  delta,
long int &  kopt,
double *  vlag,
double *  ptsaux,
double *  ptsid,
double *  w 
)
protected

◆ SetCatchGetValueException()

virtual void anima::BobyqaOptimizer::SetCatchGetValueException ( bool  _arg)
virtual

◆ SetCurrentCost()

virtual void anima::BobyqaOptimizer::SetCurrentCost ( double  _arg)
protectedvirtual

◆ SetLowerBounds()

virtual void anima::BobyqaOptimizer::SetLowerBounds ( ScalesType  _arg)
virtual

◆ SetMaximize()

virtual void anima::BobyqaOptimizer::SetMaximize ( bool  _arg)
virtual

Set if the Optimizer should Maximize the metric

◆ SetMaximumIteration()

virtual void anima::BobyqaOptimizer::SetMaximumIteration ( unsigned int  _arg)
virtual

Set/Get maximum iteration limit.

◆ SetMetricWorstPossibleValue()

virtual void anima::BobyqaOptimizer::SetMetricWorstPossibleValue ( double  _arg)
virtual

◆ SetNumberSamplingPoints()

virtual void anima::BobyqaOptimizer::SetNumberSamplingPoints ( unsigned int  _arg)
virtual

Set/Get Number of Sampling points (between Parameters+2 and (Parameters+1)(Parameters+2)/2)

◆ SetRhoBegin()

virtual void anima::BobyqaOptimizer::SetRhoBegin ( double  _arg)
virtual

Set/Get RhoBegin set the initial sampling of parameter space

◆ SetRhoEnd()

virtual void anima::BobyqaOptimizer::SetRhoEnd ( double  _arg)
virtual

Set/Get RhoEnd set the final sampling distance of parameter space

◆ SetSpaceDimension()

virtual void anima::BobyqaOptimizer::SetSpaceDimension ( unsigned int  _arg)
virtual

◆ SetUpperBounds()

virtual void anima::BobyqaOptimizer::SetUpperBounds ( ScalesType  _arg)
virtual

◆ StartOptimization()

void anima::BobyqaOptimizer::StartOptimization ( )

Start optimization.

Definition at line 39 of file animaBobyqaOptimizer.cxx.

References GetStopConditionDescription().

Referenced by ~BobyqaOptimizer().

◆ StopOptimization()

void anima::BobyqaOptimizer::StopOptimization ( )
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 82 of file animaBobyqaOptimizer.h.

◆ trsbox_()

int anima::BobyqaOptimizer::trsbox_ ( long int &  npt,
double *  xpt,
double *  xopt,
double *  gopt,
double *  hq,
double *  pq,
double *  sl,
double *  su,
double *  delta,
double *  xnew,
double *  d__,
double *  gnew,
double *  xbdi,
double *  s,
double *  hs,
double *  hred,
double *  dsq,
double *  crvmin 
)
protected

Definition at line 2741 of file animaBobyqaOptimizer.cxx.

References m_SpaceDimension.

◆ update_()

int anima::BobyqaOptimizer::update_ ( long int &  npt,
double *  bmat,
double *  zmat,
long int &  ndim,
double *  vlag,
double *  beta,
double *  denom,
long int &  knew,
double *  w 
)
protected

Definition at line 3289 of file animaBobyqaOptimizer.cxx.

References m_SpaceDimension.

Referenced by rescue_().

Member Data Documentation

◆ m_CatchGetValueException

bool anima::BobyqaOptimizer::m_CatchGetValueException
protected

Definition at line 109 of file animaBobyqaOptimizer.h.

Referenced by prelim_(), and rescue_().

◆ m_CurrentCost

MeasureType anima::BobyqaOptimizer::m_CurrentCost
protected

Internal storage for the value type / used as a cache

Definition at line 119 of file animaBobyqaOptimizer.h.

Referenced by prelim_(), and rescue_().

◆ m_CurrentIteration

unsigned int anima::BobyqaOptimizer::m_CurrentIteration
protected

Definition at line 107 of file animaBobyqaOptimizer.h.

Referenced by prelim_(), and rescue_().

◆ m_LowerBounds

ScalesType anima::BobyqaOptimizer::m_LowerBounds
protected

Definition at line 117 of file animaBobyqaOptimizer.h.

◆ m_Maximize

bool anima::BobyqaOptimizer::m_Maximize
protected

Set if the Metric should be maximized: Default = False

Definition at line 102 of file animaBobyqaOptimizer.h.

Referenced by prelim_(), and rescue_().

◆ m_MaximumIteration

unsigned int anima::BobyqaOptimizer::m_MaximumIteration
protected

Definition at line 106 of file animaBobyqaOptimizer.h.

Referenced by rescue_().

◆ m_MetricWorstPossibleValue

double anima::BobyqaOptimizer::m_MetricWorstPossibleValue
protected

Definition at line 110 of file animaBobyqaOptimizer.h.

Referenced by prelim_(), and rescue_().

◆ m_NumberSamplingPoints

unsigned int anima::BobyqaOptimizer::m_NumberSamplingPoints
protected

Definition at line 112 of file animaBobyqaOptimizer.h.

◆ m_RhoBegin

double anima::BobyqaOptimizer::m_RhoBegin
protected

Definition at line 113 of file animaBobyqaOptimizer.h.

◆ m_RhoEnd

double anima::BobyqaOptimizer::m_RhoEnd
protected

Definition at line 113 of file animaBobyqaOptimizer.h.

◆ m_SpaceDimension

unsigned int anima::BobyqaOptimizer::m_SpaceDimension
protected

Definition at line 104 of file animaBobyqaOptimizer.h.

Referenced by altmov_(), prelim_(), rescue_(), trsbox_(), and update_().

◆ m_Stop

bool anima::BobyqaOptimizer::m_Stop
protected

this is user-settable flag to stop optimization. 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 animaBobyqaOptimizer.h.

◆ m_StopConditionDescription

std::ostringstream anima::BobyqaOptimizer::m_StopConditionDescription
protected

Definition at line 130 of file animaBobyqaOptimizer.h.

Referenced by rescue_().

◆ m_UpperBounds

ScalesType anima::BobyqaOptimizer::m_UpperBounds
protected

Definition at line 117 of file animaBobyqaOptimizer.h.

◆ px

BobyqaOptimizer::ParametersType anima::BobyqaOptimizer::px
protected

Definition at line 116 of file animaBobyqaOptimizer.h.

Referenced by prelim_(), and rescue_().


The documentation for this class was generated from the following files: