ConstrainedOptPack::DirectLineSearchArmQuad_Strategy Class Reference

Performs a line search using the Armijo condition and uses quadratic interpolation to select each new alpha. More...

#include <ConstrainedOptPack_DirectLineSearchArmQuad_Strategy.hpp>

Inheritance diagram for ConstrainedOptPack::DirectLineSearchArmQuad_Strategy:

[legend]
List of all members.

Overridden from DirectLineSearch_Strategy

void set_max_iter (int max_iter)
 
int max_iter () const
 
int num_iterations () const
 
bool do_line_search (const MeritFuncCalc1D &phi, value_type phi_k, value_type *alpha_k, value_type *phi_kp1, std::ostream *out)
 Performs the following line search:.
void print_algorithm (std::ostream &out, const std::string &leading_str) const
 

Public Member Functions

void eta (const value_type &eta)
 Set the Armijo cord test fractional reduction parameter.
const value_typeeta () const
void min_frac (const value_type &min_frac)
 The minimum fraction that alpha is reduced for each line search iteration.
const value_typemin_frac () const
void max_frac (const value_type &max_frac)
 The maximum fraction that alpha is reduced for each line search iteration.
const value_typemax_frac () const
void max_out_iter (const bool &max_out_iter)
 Deterimine if the line search iterations are maxed out or not.
const bool & max_out_iter () const
 DirectLineSearchArmQuad_Strategy (int max_iter=20, value_type eta=1.0e-4, value_type min_frac=0.1, value_type max_frac=0.5, bool max_out_iter=false)
 Constructs with default settings.

Private Member Functions

void validate_parameters () const

Private Attributes

value_type eta_
value_type min_frac_
value_type max_frac_
bool max_out_iter_
int max_iter_
int num_iter_

Detailed Description

Performs a line search using the Armijo condition and uses quadratic interpolation to select each new alpha.

Definition at line 40 of file ConstrainedOptPack_DirectLineSearchArmQuad_Strategy.hpp.


Constructor & Destructor Documentation

ConstrainedOptPack::DirectLineSearchArmQuad_Strategy::DirectLineSearchArmQuad_Strategy int  max_iter = 20,
value_type  eta = 1.0e-4,
value_type  min_frac = 0.1,
value_type  max_frac = 0.5,
bool  max_out_iter = false
 

Constructs with default settings.

Definition at line 46 of file ConstrainedOptPack_DirectLineSearchArmQuad_Strategy.cpp.


Member Function Documentation

void ConstrainedOptPack::DirectLineSearchArmQuad_Strategy::eta const value_type eta  )  [inline]
 

Set the Armijo cord test fractional reduction parameter.

Definition at line 44 of file ConstrainedOptPack_DirectLineSearchArmQuad_Strategy.hpp.

const value_type& ConstrainedOptPack::DirectLineSearchArmQuad_Strategy::eta  )  const [inline]
 

Definition at line 44 of file ConstrainedOptPack_DirectLineSearchArmQuad_Strategy.hpp.

void ConstrainedOptPack::DirectLineSearchArmQuad_Strategy::min_frac const value_type min_frac  )  [inline]
 

The minimum fraction that alpha is reduced for each line search iteration.

Definition at line 47 of file ConstrainedOptPack_DirectLineSearchArmQuad_Strategy.hpp.

const value_type& ConstrainedOptPack::DirectLineSearchArmQuad_Strategy::min_frac  )  const [inline]
 

Definition at line 47 of file ConstrainedOptPack_DirectLineSearchArmQuad_Strategy.hpp.

void ConstrainedOptPack::DirectLineSearchArmQuad_Strategy::max_frac const value_type max_frac  )  [inline]
 

The maximum fraction that alpha is reduced for each line search iteration.

Definition at line 50 of file ConstrainedOptPack_DirectLineSearchArmQuad_Strategy.hpp.

const value_type& ConstrainedOptPack::DirectLineSearchArmQuad_Strategy::max_frac  )  const [inline]
 

Definition at line 50 of file ConstrainedOptPack_DirectLineSearchArmQuad_Strategy.hpp.

void ConstrainedOptPack::DirectLineSearchArmQuad_Strategy::max_out_iter const bool &  max_out_iter  )  [inline]
 

Deterimine if the line search iterations are maxed out or not.

This option is really only used for debugging and requires changing the other parameters to make it useful.

Definition at line 57 of file ConstrainedOptPack_DirectLineSearchArmQuad_Strategy.hpp.

const bool& ConstrainedOptPack::DirectLineSearchArmQuad_Strategy::max_out_iter  )  const [inline]
 

Definition at line 57 of file ConstrainedOptPack_DirectLineSearchArmQuad_Strategy.hpp.

void ConstrainedOptPack::DirectLineSearchArmQuad_Strategy::set_max_iter int  max_iter  )  [virtual]
 

Implements ConstrainedOptPack::DirectLineSearch_Strategy.

Definition at line 60 of file ConstrainedOptPack_DirectLineSearchArmQuad_Strategy.cpp.

int ConstrainedOptPack::DirectLineSearchArmQuad_Strategy::max_iter  )  const [virtual]
 

Implements ConstrainedOptPack::DirectLineSearch_Strategy.

Definition at line 65 of file ConstrainedOptPack_DirectLineSearchArmQuad_Strategy.cpp.

int ConstrainedOptPack::DirectLineSearchArmQuad_Strategy::num_iterations  )  const [virtual]
 

Implements ConstrainedOptPack::DirectLineSearch_Strategy.

Definition at line 70 of file ConstrainedOptPack_DirectLineSearchArmQuad_Strategy.cpp.

bool ConstrainedOptPack::DirectLineSearchArmQuad_Strategy::do_line_search const MeritFuncCalc1D phi,
value_type  phi_k,
value_type alpha_k,
value_type phi_kp1,
std::ostream *  out
[virtual]
 

Performs the following line search:.


   num_iter = 0;
   while( phi.value(alpha_k) > phi_k + eta * alpha_k * phi.deriv() ) 
   {
      if(num_iter >= max_iter) return true;
      num_iter = num_iter + 1;
      alpha_k = [ min_frac * alpha_k <= quadradic interpolation for alpha	<= max_frac * alpha_k ];
   }
   return true;<br>
   
If the maximum number of iterations is exceeded then false will be returned.

The default values for the adjustable parameters (from D&S A6.3.1) are:
max_iter = 20
eta = 1.0e-4
min_frac = 0.1
max_frac = 0.5

Implements ConstrainedOptPack::DirectLineSearch_Strategy.

Definition at line 75 of file ConstrainedOptPack_DirectLineSearchArmQuad_Strategy.cpp.

void ConstrainedOptPack::DirectLineSearchArmQuad_Strategy::print_algorithm std::ostream &  out,
const std::string &  leading_str
const [virtual]
 

Reimplemented from ConstrainedOptPack::DirectLineSearch_Strategy.

Definition at line 201 of file ConstrainedOptPack_DirectLineSearchArmQuad_Strategy.cpp.

void ConstrainedOptPack::DirectLineSearchArmQuad_Strategy::validate_parameters  )  const [private]
 

Definition at line 250 of file ConstrainedOptPack_DirectLineSearchArmQuad_Strategy.cpp.


Member Data Documentation

value_type ConstrainedOptPack::DirectLineSearchArmQuad_Strategy::eta_ [private]
 

Definition at line 44 of file ConstrainedOptPack_DirectLineSearchArmQuad_Strategy.hpp.

value_type ConstrainedOptPack::DirectLineSearchArmQuad_Strategy::min_frac_ [private]
 

Definition at line 47 of file ConstrainedOptPack_DirectLineSearchArmQuad_Strategy.hpp.

value_type ConstrainedOptPack::DirectLineSearchArmQuad_Strategy::max_frac_ [private]
 

Definition at line 50 of file ConstrainedOptPack_DirectLineSearchArmQuad_Strategy.hpp.

bool ConstrainedOptPack::DirectLineSearchArmQuad_Strategy::max_out_iter_ [private]
 

Definition at line 57 of file ConstrainedOptPack_DirectLineSearchArmQuad_Strategy.hpp.

int ConstrainedOptPack::DirectLineSearchArmQuad_Strategy::max_iter_ [private]
 

Definition at line 113 of file ConstrainedOptPack_DirectLineSearchArmQuad_Strategy.hpp.

int ConstrainedOptPack::DirectLineSearchArmQuad_Strategy::num_iter_ [private]
 

Definition at line 114 of file ConstrainedOptPack_DirectLineSearchArmQuad_Strategy.hpp.


The documentation for this class was generated from the following files:
Generated on Thu Sep 18 12:36:14 2008 for MOOCHO (Single Doxygen Collection) by doxygen 1.3.9.1