#include <optimize.h>
Inheritance diagram for _search:
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 |
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:
Definition at line 53 of file optimize.h.
|
Definition at line 54 of file optimize.h. |
|
Definition at line 55 of file optimize.h. |
|
Search direction at w.
Reimplemented in _gradient_descent, _gd_momentum, and _conjugate_gradient. Definition at line 60 of file optimize.h. References _search::dir. |
|
Initialize local variables.
Reimplemented in _gradient_descent, _gd_adaptive, and _line_search. Definition at line 58 of file optimize.h. |
|
Stopping criteria.
Reimplemented in _gradient_descent, _gd_adaptive, and _line_search. Definition at line 67 of file optimize.h. |
|
Should we go in direction d? How far?.
Reimplemented in _gradient_descent, and _line_search. Definition at line 62 of file optimize.h. |
|
Update the weight.
Definition at line 65 of file optimize.h. |
|
Definition at line 69 of file optimize.h. Referenced by _search::direction(). |