_search Struct Template Reference

Interface used in iterative optimization algorithms. More...

#include <optimize.h>

Inheritance diagram for _search:

Inheritance graph
[legend]
Collaboration diagram for _search:

Collaboration graph
[legend]
List of all members.

Public Types

typedef Dir direction_type
typedef Step step_length_type

Public Member Functions

void initialize ()
 Initialize local variables.
const Dir & direction ()
 Search direction at w.
std::pair< bool, Step > step_length (const Dir &d)
 Should we go in direction d? How far?.
void update_weight (const Dir &d, const Step &s)
 Update the weight.
bool satisfied ()
 Stopping criteria.

Protected Attributes

Dir dir

Detailed Description

template<class Dir, class Step>
struct lemga::_search< Dir, Step >

Interface used in iterative optimization algorithms.

This template is used in joint with the generic optimization algorithm iterative_optimize(). It describes functions that a class have to provide in order to use iterative_optimize().

Some arithmetic operations on gradient are needed for optimization. The full set required consists of

Using such interface improves the flexibility of code. However, there are always concerns about the performance. Here are several considerations for the sake of performance:

Todo:
Does making these functions pure virtual sacrifice the performance?

Definition at line 53 of file optimize.h.


Member Typedef Documentation

typedef Dir direction_type
 

Definition at line 54 of file optimize.h.

typedef Step step_length_type
 

Definition at line 55 of file optimize.h.


Member Function Documentation

const Dir& direction  )  [inline]
 

Search direction at w.

Reimplemented in _gradient_descent, _gd_momentum, and _conjugate_gradient.

Definition at line 60 of file optimize.h.

References _search::dir.

void initialize  )  [inline]
 

Initialize local variables.

Reimplemented in _gradient_descent, _gd_adaptive, and _line_search.

Definition at line 58 of file optimize.h.

bool satisfied  )  [inline]
 

Stopping criteria.

Reimplemented in _gradient_descent, _gd_adaptive, and _line_search.

Definition at line 67 of file optimize.h.

std::pair<bool,Step> step_length const Dir &  d  )  [inline]
 

Should we go in direction d? How far?.

Reimplemented in _gradient_descent, and _line_search.

Definition at line 62 of file optimize.h.

void update_weight const Dir &  d,
const Step &  s
[inline]
 

Update the weight.

Definition at line 65 of file optimize.h.


Member Data Documentation

Dir dir [protected]
 

Definition at line 69 of file optimize.h.

Referenced by _search::direction().


The documentation for this struct was generated from the following file:
Generated on Wed Nov 8 08:17:08 2006 for LEMGA by  doxygen 1.4.6