|
primatologist-gpl 6.0.4
|
#include <primatologist/optimization/gradient_decl.h>

Public Types | |
| typedef O | Objective |
| typedef L< O > | LineSearch |
| typedef math::Matrix | Matrix |
| typedef math::Vector | Vector |
Public Member Functions | |
| GradientDescent (const Objective &f=Objective(), const Vector &x=Vector()) | |
| GradientDescent (const GradientDescent< O, L > &other) | |
| ~GradientDescent () | |
| GradientDescent< O, L > & | operator= (const GradientDescent< O, L > &other) |
| void | setGamma (float gamma=0.1) |
| void | setStopCriterion (const std::string &crit="absdiff") |
| Can take values: | |
| void | setStopValue (float epsilon=1E-5) |
| void | setLineSearch (const LineSearch &l=LineSearch()) |
| void | setMaximize (bool maximize=false) |
| void | setMaxIterations (int n=- 1) |
| void | setVerbose (int v=carto::verbose) |
| void | setObjectiveFunction (const Objective &f) |
| void | setPosition (const Vector &x=Vector()) |
| float | gamma () const |
| const std::string & | stopCriterion () const |
| float | stopValue () const |
| LineSearch & | lineSearch () |
| bool | maximize () const |
| int | maxIterations () const |
| int | verbose () const |
| const Vector & | position () const |
| const Objective & | objectiveFunction () const |
| Vector | execute () |
Protected Attributes | |
| float | _gamma |
| Fixed Gamma or initial gamma for line search. | |
| Vector | _x |
| position | |
| Objective | _f |
| objectiveFunction | |
| LineSearch | _ls |
| lineSearch | |
| int | _verbose |
| verbosity level | |
| bool | _maximize |
| maximize or minimize | |
| int | _max_it |
| maximum number of iterations | |
| std::string | _crit |
| stop criterion | |
| float | _epsilon |
| stop value | |
Definition at line 25 of file gradient_decl.h.
| typedef L<O> aims::GradientDescent< O, L >::LineSearch |
Definition at line 32 of file gradient_decl.h.
| typedef math::Matrix aims::GradientDescent< O, L >::Matrix |
Definition at line 33 of file gradient_decl.h.
| typedef O aims::GradientDescent< O, L >::Objective |
Definition at line 31 of file gradient_decl.h.
| typedef math::Vector aims::GradientDescent< O, L >::Vector |
Definition at line 34 of file gradient_decl.h.
| aims::GradientDescent< O, L >::GradientDescent | ( | const Objective & | f = Objective(), |
| const Vector & | x = Vector() ) |
Definition at line 23 of file gradient_d.h.
References _f, _x, setGamma(), setLineSearch(), setMaximize(), setMaxIterations(), setStopCriterion(), setStopValue(), and setVerbose().
Referenced by GradientDescent(), and operator=().
| aims::GradientDescent< O, L >::GradientDescent | ( | const GradientDescent< O, L > & | other | ) |
Definition at line 37 of file gradient_d.h.
References _f, _gamma, _ls, _max_it, _maximize, _verbose, _x, and GradientDescent().
| aims::GradientDescent< O, L >::~GradientDescent | ( | ) |
Definition at line 48 of file gradient_d.h.
| GradientDescent< O, L >::Vector aims::GradientDescent< O, L >::execute | ( | ) |
Definition at line 198 of file gradient_d.h.
References gamma(), lineSearch(), maximize(), maxIterations(), objectiveFunction(), position(), stopCriterion(), stopValue(), and verbose().
| float aims::GradientDescent< O, L >::gamma | ( | ) | const |
Definition at line 137 of file gradient_d.h.
References _gamma.
Referenced by execute(), and setGamma().
| GradientDescent< O, L >::LineSearch & aims::GradientDescent< O, L >::lineSearch | ( | ) |
Definition at line 156 of file gradient_d.h.
References _ls.
Referenced by execute(), setLineSearch(), setMaximize(), setObjectiveFunction(), and setVerbose().
| bool aims::GradientDescent< O, L >::maximize | ( | ) | const |
Definition at line 162 of file gradient_d.h.
References _maximize.
Referenced by execute(), setLineSearch(), and setMaximize().
| int aims::GradientDescent< O, L >::maxIterations | ( | ) | const |
| const GradientDescent< O, L >::Objective & aims::GradientDescent< O, L >::objectiveFunction | ( | ) | const |
Definition at line 188 of file gradient_d.h.
References _f.
Referenced by execute(), and setLineSearch().
| GradientDescent< O, L > & aims::GradientDescent< O, L >::operator= | ( | const GradientDescent< O, L > & | other | ) |
Definition at line 53 of file gradient_d.h.
References _f, _gamma, _ls, _max_it, _maximize, _verbose, _x, and GradientDescent().
| const GradientDescent< O, L >::Vector & aims::GradientDescent< O, L >::position | ( | ) | const |
| void aims::GradientDescent< O, L >::setGamma | ( | float | gamma = 0.1 | ) |
Definition at line 73 of file gradient_d.h.
References _gamma, and gamma().
Referenced by GradientDescent().
| void aims::GradientDescent< O, L >::setLineSearch | ( | const LineSearch & | l = LineSearch() | ) |
Definition at line 91 of file gradient_d.h.
References _ls, lineSearch(), maximize(), objectiveFunction(), and verbose().
Referenced by GradientDescent().
| void aims::GradientDescent< O, L >::setMaximize | ( | bool | maximize = false | ) |
Definition at line 100 of file gradient_d.h.
References _maximize, lineSearch(), and maximize().
Referenced by GradientDescent().
| void aims::GradientDescent< O, L >::setMaxIterations | ( | int | n = - 1 | ) |
| void aims::GradientDescent< O, L >::setObjectiveFunction | ( | const Objective & | f | ) |
Definition at line 120 of file gradient_d.h.
References _f, and lineSearch().
| void aims::GradientDescent< O, L >::setPosition | ( | const Vector & | x = Vector() | ) |
Definition at line 127 of file gradient_d.h.
References _x.
| void aims::GradientDescent< O, L >::setStopCriterion | ( | const std::string & | crit = "absdiff" | ) |
Can take values:
Definition at line 79 of file gradient_d.h.
References _crit.
Referenced by GradientDescent().
| void aims::GradientDescent< O, L >::setStopValue | ( | float | epsilon = 1E-5 | ) |
| void aims::GradientDescent< O, L >::setVerbose | ( | int | v = carto::verbose | ) |
Definition at line 113 of file gradient_d.h.
References _verbose, and lineSearch().
Referenced by GradientDescent().
| const std::string & aims::GradientDescent< O, L >::stopCriterion | ( | ) | const |
| float aims::GradientDescent< O, L >::stopValue | ( | ) | const |
| int aims::GradientDescent< O, L >::verbose | ( | ) | const |
Definition at line 174 of file gradient_d.h.
References _verbose.
Referenced by execute(), and setLineSearch().
|
protected |
stop criterion
Definition at line 100 of file gradient_decl.h.
Referenced by setStopCriterion(), and stopCriterion().
|
protected |
stop value
Definition at line 101 of file gradient_decl.h.
Referenced by setStopValue(), and stopValue().
|
protected |
objectiveFunction
Definition at line 95 of file gradient_decl.h.
Referenced by GradientDescent(), GradientDescent(), objectiveFunction(), operator=(), and setObjectiveFunction().
|
protected |
Fixed Gamma or initial gamma for line search.
Definition at line 93 of file gradient_decl.h.
Referenced by gamma(), GradientDescent(), operator=(), and setGamma().
|
protected |
lineSearch
Definition at line 96 of file gradient_decl.h.
Referenced by GradientDescent(), lineSearch(), operator=(), and setLineSearch().
|
protected |
maximum number of iterations
Definition at line 99 of file gradient_decl.h.
Referenced by GradientDescent(), maxIterations(), operator=(), and setMaxIterations().
|
protected |
maximize or minimize
Definition at line 98 of file gradient_decl.h.
Referenced by GradientDescent(), maximize(), operator=(), and setMaximize().
|
protected |
verbosity level
Definition at line 97 of file gradient_decl.h.
Referenced by GradientDescent(), operator=(), setVerbose(), and verbose().
|
protected |
position
Definition at line 94 of file gradient_decl.h.
Referenced by GradientDescent(), GradientDescent(), operator=(), position(), and setPosition().