Public Member Functions | Protected Member Functions | List of all members
mirtk::BrentLineSearch Class Reference

#include <BrentLineSearch.h>

Inheritance diagram for mirtk::BrentLineSearch:
Inheritance graph
Collaboration diagram for mirtk::BrentLineSearch:
Collaboration graph

Public Member Functions

 BrentLineSearch (ObjectiveFunction *=NULL)
 Constructor.
 
 BrentLineSearch (const BrentLineSearch &)
 Copy constructor.
 
BrentLineSearchoperator= (const BrentLineSearch &)
 Assignment operator.
 
virtual ParameterList Parameter () const
 Get parameters as key/value as string map.
 
virtual double Run ()
 Make optimal step along search direction.
 
virtual bool Set (const char *, const char *)
 Set parameter value from string.
 
virtual ~BrentLineSearch ()
 Destructor.
 
- Public Member Functions inherited from mirtk::InexactLineSearch
virtual void Function (ObjectiveFunction *)
 Set objective function.
 
 InexactLineSearch (ObjectiveFunction *=NULL)
 Constructor.
 
 InexactLineSearch (const InexactLineSearch &)
 Copy constructor.
 
InexactLineSearchoperator= (const InexactLineSearch &)
 Assignment operator.
 
virtual ~InexactLineSearch ()
 Destructor.
 
- Public Member Functions inherited from mirtk::LineSearch
virtual void Initialize ()
 Initialize optimization.
 
virtual LineSearchStrategy Strategy () const =0
 Line search strategy implemented by this line search.
 
virtual ~LineSearch ()
 Destructor.
 
- Public Member Functions inherited from mirtk::LocalOptimizer
void AddStoppingCriterion (StoppingCriterion *)
 Add stopping criterion and take over ownership of the object.
 
void ClearStoppingCriteria ()
 Delete all stopping criteria.
 
int NumberOfStoppingCriteria () const
 Get number of stopping criteria.
 
virtual enum OptimizationMethod OptimizationMethod () const =0
 Optimization method implemented by this optimizer.
 
void RemoveStoppingCriterion (StoppingCriterion *)
 Remove stopping criterion and revoke ownership of the object.
 
class StoppingCriterionStoppingCriterion (int)
 Get the n-th stopping criterion.
 
const class StoppingCriterionStoppingCriterion (int) const
 Get the n-th stopping criterion.
 
virtual ~LocalOptimizer ()
 Destructor.
 
- Public Member Functions inherited from mirtk::Observable
void AddObserver (Observer &)
 Add observer.
 
void Broadcast (Event, const void *=NULL)
 Broadcast event to observers.
 
void ClearObservers ()
 Delete all observers.
 
void DeleteObserver (Observer &)
 Delete observer.
 
void NotifyObservers (Event, const void *=NULL)
 Notify all observers about given event if this object has changed.
 
int NumberOfObservers () const
 Number of current observers.
 
virtual ~Observable ()
 Destructor.
 
- Public Member Functions inherited from mirtk::Object
virtual const char * NameOfClass () const =0
 Get name of class, which this object is an instance of.
 
bool Parameter (const ParameterList &)
 Set parameters from name/value pairs.
 
virtual ~Object ()
 Destructor.
 

Protected Member Functions

double BracketExtremum (double &a, double &b, double &c, double *delta=NULL)
 
- Protected Member Functions inherited from mirtk::InexactLineSearch
double Advance (double)
 
void Retreat (double)
 Revert step in search direction.
 
double Value (double, double *=NULL)
 
- Protected Member Functions inherited from mirtk::LineSearch
 LineSearch (ObjectiveFunction *=NULL)
 Constructor.
 
 LineSearch (const LineSearch &)
 Copy constructor.
 
LineSearchoperator= (const LineSearch &)
 Assignment operator.
 
- Protected Member Functions inherited from mirtk::LocalOptimizer
virtual bool Converged (int iter, double value, const double *delta)
 
bool IsImprovement (double prev, double value) const
 
 LocalOptimizer (ObjectiveFunction *=NULL)
 Constructor.
 
 LocalOptimizer (const LocalOptimizer &)
 Copy constructor.
 
LocalOptimizeroperator= (const LocalOptimizer &)
 Assignment operator.
 
- Protected Member Functions inherited from mirtk::Observable
 Observable ()
 Default constructor.
 
 Observable (const Observable &)
 Copy constructor.
 
Observableoperator= (const Observable &)
 Assignment operator.
 
- Protected Member Functions inherited from mirtk::Object
template<typename... Args>
void Throw (ErrorType err, const char *func, Args... args) const
 

Additional Inherited Members

- Public Types inherited from mirtk::LocalOptimizer
typedef ObjectFactory< enum OptimizationMethod, LocalOptimizerFactoryType
 Type of optimizer factory.
 
- Static Public Member Functions inherited from mirtk::LineSearch
static LineSearchNew (LineSearchStrategy &, ObjectiveFunction *=NULL)
 Instantiate line search implementing specified strategy.
 
- Static Public Member Functions inherited from mirtk::LocalOptimizer
static FactoryTypeFactory ()
 Get global optimizer factory instance.
 
static LocalOptimizerNew (enum OptimizationMethod, ObjectiveFunction *=NULL)
 Construct optimizer.
 
- Static Public Member Functions inherited from mirtk::Object
static const char * NameOfType ()
 Get name of this class type.
 
- Static Protected Member Functions inherited from mirtk::Object
template<typename... Args>
static void ThrowStatic (ErrorType err, const char *cls, const char *func, Args... args)
 
- Protected Attributes inherited from mirtk::InexactLineSearch
double * _CurrentDoFValues
 Previous function parameters.
 
double * _ScaledDirection
 Line search direction scaled by current step length.
 

Detailed Description

Performs a line search using Brent's method

This line search strategy uses Brent's method to find an optimal step length within a given search interval. It initially brackets the minimum when the user specified step length range does not need to be strictly followed.

Definition at line 36 of file BrentLineSearch.h.

Member Function Documentation

§ BracketExtremum()

double mirtk::BrentLineSearch::BracketExtremum ( double &  a,
double &  b,
double &  c,
double *  delta = NULL 
)
protected

Bracket extremum of objective function

This function finds an initial triplet (a, b, c) of step lengths which brackets a minimum (or maximum if _Descent is false) of the objective function.

Parameters
[out]aMinimum step length.
[out]bStep length for which objective function achieves an extremum in the step length interval [a, b].
[out]cMaximum step length.
[out]deltaMaximum change of objective function parameter for step length equal to b. Not returned if NULL.
Returns
Objective function value for step length b.

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