ConstrainedOptPack::DirectLineSearch_Strategy Class Reference

Abstract strategy interface for 1D line searches {abstract}. More...

#include <ConstrainedOptPack_DirectLineSearch_Strategy.hpp>

Inheritance diagram for ConstrainedOptPack::DirectLineSearch_Strategy:

Inheritance graph
[legend]
List of all members.

Public Member Functions

virtual ~DirectLineSearch_Strategy ()
 
virtual void set_max_iter (int max_iter)=0
 Set the maximum number of iterations.
virtual int max_iter () const =0
 Get the maximum number of iterations.
virtual int num_iterations () const =0
 Get the number of iterations performed.
virtual bool do_line_search (const MeritFuncCalc1D &phi, value_type phi_k, value_type *alpha_k, value_type *phi_kp1, std::ostream *out=0)=0
 Called to perform the linesearch.
virtual void print_algorithm (std::ostream &out, const std::string &leading_str) const
 Print the direct line search algorithm.

Classes

class  NotDescentDirection
 Thrown if the direction vector d_k is not a descent direction for the merit funciton. More...

Detailed Description

Abstract strategy interface for 1D line searches {abstract}.

This is the interface for strategy objects that perform a line search from an initial point along a search direction given a merit function.

Definition at line 44 of file ConstrainedOptPack_DirectLineSearch_Strategy.hpp.


Constructor & Destructor Documentation

virtual ConstrainedOptPack::DirectLineSearch_Strategy::~DirectLineSearch_Strategy (  )  [inline, virtual]

Definition at line 57 of file ConstrainedOptPack_DirectLineSearch_Strategy.hpp.


Member Function Documentation

virtual void ConstrainedOptPack::DirectLineSearch_Strategy::set_max_iter ( int  max_iter  )  [pure virtual]

Set the maximum number of iterations.

Implemented in ConstrainedOptPack::DirectLineSearchArmQuad_Strategy.

virtual int ConstrainedOptPack::DirectLineSearch_Strategy::max_iter (  )  const [pure virtual]

Get the maximum number of iterations.

Implemented in ConstrainedOptPack::DirectLineSearchArmQuad_Strategy.

virtual int ConstrainedOptPack::DirectLineSearch_Strategy::num_iterations (  )  const [pure virtual]

Get the number of iterations performed.

Implemented in ConstrainedOptPack::DirectLineSearchArmQuad_Strategy.

virtual bool ConstrainedOptPack::DirectLineSearch_Strategy::do_line_search ( const MeritFuncCalc1D phi,
value_type  phi_k,
value_type *  alpha_k,
value_type *  phi_kp1,
std::ostream *  out = 0 
) [pure virtual]

Called to perform the linesearch.

This operaion computes the approximate minimum to a merit function along a search direcation. More specifically the following problem is approximatly solved:

min phi(alpha) s.t. alpha = [0, alpha_upper]

Actually, if the initial alpha satisfys an internal descent requirement, then it will be choosen over smaller values of alpha that may result in a greater reduction in the given merit funciton.

If the maximum number of iterations is exceeded then the subclass will return false and will return the values of alpha_k, x_kp1, and phi_kp1 for the lowest value of phi_kp1 found, and the last call to phi.value(x) will be this best x_kp1.

Preconditions: {itemize} phi.deriv(d_k) < 0 (throw NotDescentDirection) {itemize}

Parameters:
phi [in] The merit function object that will compute phi.value(alpha) and the descent derivative.
phi_k [in] The value of phi.value(0). Not computed internally for the sake of efficency.
alpha_k [in/out] The initial alpha_k to try on input (usually 1). On output alpha_k is the accepted value for a successful line search, or it will be the alpha_k for the minimum phi found for a line search failure.
phi_kp1 [in/out] Merit function at new point. On input it must be the value of phi.value(alpha_k) and on output is set to phi.value(alpha_k).
out [in/out] If != 0 then output is sent to this stream to record the progress of the linesearch iterations. The default is zero.
Returns:
true: Successful line search; false: Line search failure.

Implemented in ConstrainedOptPack::DirectLineSearchArmQuad_Strategy.

virtual void ConstrainedOptPack::DirectLineSearch_Strategy::print_algorithm ( std::ostream &  out,
const std::string &  leading_str 
) const [inline, virtual]

Print the direct line search algorithm.

The default does nothing.

Reimplemented in ConstrainedOptPack::DirectLineSearchArmQuad_Strategy.

Definition at line 120 of file ConstrainedOptPack_DirectLineSearch_Strategy.hpp.


The documentation for this class was generated from the following file:
Generated on Tue Jul 13 09:29:24 2010 for ConstrainedOptPack: C++ Tools for Constrained (and Unconstrained) Optimization by  doxygen 1.4.7