MOOCHO (Single Doxygen Collection)
Version of the Day
|
Abstract strategy interface for 1D line searches {abstract}. More...
#include <ConstrainedOptPack_DirectLineSearch_Strategy.hpp>
Classes | |
class | NotDescentDirection |
Thrown if the direction vector d_k is not a descent direction for the merit funciton. More... | |
Public Member Functions | |
virtual | ~DirectLineSearch_Strategy () |
virtual void | set_max_iter (int max_iter)=0 |
Set the maximum number of iterations. More... | |
virtual int | max_iter () const =0 |
Get the maximum number of iterations. More... | |
virtual int | num_iterations () const =0 |
Get the number of iterations performed. More... | |
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. More... | |
virtual void | print_algorithm (std::ostream &out, const std::string &leading_str) const |
Print the direct line search algorithm. More... | |
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 57 of file ConstrainedOptPack_DirectLineSearch_Strategy.hpp.
|
inlinevirtual |
Definition at line 70 of file ConstrainedOptPack_DirectLineSearch_Strategy.hpp.
|
pure virtual |
Set the maximum number of iterations.
Implemented in ConstrainedOptPack::DirectLineSearchArmQuad_Strategy.
|
pure virtual |
Get the maximum number of iterations.
Implemented in ConstrainedOptPack::DirectLineSearchArmQuad_Strategy.
|
pure virtual |
Get the number of iterations performed.
Implemented in ConstrainedOptPack::DirectLineSearchArmQuad_Strategy.
|
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}
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. |
true:
Successful line search; false:
Line search failure. Implemented in ConstrainedOptPack::DirectLineSearchArmQuad_Strategy.
|
inlinevirtual |
Print the direct line search algorithm.
The default does nothing.
Reimplemented in ConstrainedOptPack::DirectLineSearchArmQuad_Strategy.
Definition at line 133 of file ConstrainedOptPack_DirectLineSearch_Strategy.hpp.