DGtal
0.6.devel
|
#include <AngleLinearMinimizer.h>
Public Member Functions | |
AngleLinearMinimizerByGradientDescent (double step=0.1) | |
virtual | ~AngleLinearMinimizerByGradientDescent () |
virtual double | lastDelta () const |
virtual void | selfDisplay (std::ostream &aStream) const |
![]() | |
virtual | ~AngleLinearMinimizer () |
AngleLinearMinimizer () | |
void | reset () |
void | init (unsigned int nbMax) |
ValueInfo & | rw (unsigned int i) |
const ValueInfo & | ro (unsigned int i) const |
unsigned int | maxSize () const |
unsigned int | size () const |
void | setSize (unsigned int nb) |
void | setIsCurveOpen (bool is_curve_open=false) |
double | getEnergy (unsigned int i1, unsigned int i2) const |
double | getFormerEnergy (unsigned int i1, unsigned int i2) const |
std::vector< double > | getGradient () const |
std::vector< double > | getFormerGradient () const |
double | optimize () |
double | optimize (unsigned int i1, unsigned int i2) |
double | sum () const |
double | max () const |
std::string | className () const |
bool | isValid () const |
Protected Member Functions | |
virtual void | oneStep (unsigned int i1, unsigned int i2) |
Private Attributes | |
double | myStep |
Additional Inherited Members | |
![]() | |
bool | myIsCurveOpen |
ValueInfo * | myValues |
unsigned int | mySize |
Specializes AngleLinearMinimizer to optimize with a gradient descent method.
Definition at line 423 of file AngleLinearMinimizer.h.
|
inline |
Default constructor. Does nothing.
Definition at line 89 of file AngleLinearMinimizer.ih.
|
inlinevirtual |
|
virtual |
Should be used to stop the minimization process. The smaller is this value, the more the optimization is at an end. May have several meanings, like the infinite norm of the last displacement or the infinite norm of the projected gradient.
Reimplemented from DGtal::AngleLinearMinimizer.
Definition at line 389 of file AngleLinearMinimizer.cpp.
References DGtal::AngleLinearMinimizer::ValueInfo::oldValue, and DGtal::AngleLinearMinimizer::ValueInfo::value.
|
protectedvirtual |
The method which performs the optimization effectively. Use a relaxation technique. The optimization is performed on values [i1] included to [i2] excluded.
i1 | the first value to be optimized (between 0 and 'size()-1'). |
i2 | the value after the last to be optimized (between 0 and 'size()-1'). |
Reimplemented from DGtal::AngleLinearMinimizer.
Definition at line 361 of file AngleLinearMinimizer.cpp.
References DGtal::AngleComputer::cast(), DGtal::AngleComputer::less(), DGtal::AngleLinearMinimizer::ValueInfo::max, DGtal::AngleLinearMinimizer::ValueInfo::min, DGtal::ModuloComputer< TInteger >::next(), DGtal::AngleLinearMinimizer::ValueInfo::oldValue, and DGtal::AngleLinearMinimizer::ValueInfo::value.
|
virtual |
Writes/Displays the object on an output stream.
aStream | the output stream where the object is written. |
Reimplemented from DGtal::AngleLinearMinimizer.
Definition at line 495 of file AngleLinearMinimizer.cpp.
|
private |
The step for the gradient descent.
Definition at line 430 of file AngleLinearMinimizer.h.