DGtal  0.9.3beta
Public Member Functions | Protected Member Functions | Private Attributes
DGtal::AngleLinearMinimizerByGradientDescent Class Reference

#include <DGtal/math/AngleLinearMinimizer.h>

Inheritance diagram for DGtal::AngleLinearMinimizerByGradientDescent:
Collaboration diagram for DGtal::AngleLinearMinimizerByGradientDescent:

Public Member Functions

 AngleLinearMinimizerByGradientDescent (double step=0.1)
virtual ~AngleLinearMinimizerByGradientDescent ()
virtual double lastDelta () const
virtual void selfDisplay (std::ostream &aStream) const
- Public Member Functions inherited from DGtal::AngleLinearMinimizer
virtual ~AngleLinearMinimizer ()
 AngleLinearMinimizer ()
void reset ()
void init (unsigned int nbMax)
ValueInforw (unsigned int i)
const ValueInforo (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
void selfDisplay (std::ostream &out) const
bool isValid () const

Protected Member Functions

virtual void oneStep (unsigned int i1, unsigned int i2)

Private Attributes

double myStep

Additional Inherited Members

- Protected Attributes inherited from DGtal::AngleLinearMinimizer
bool myIsCurveOpen
unsigned int mySize

Detailed Description

Specializes AngleLinearMinimizer to optimize with a gradient descent method.

Definition at line 414 of file AngleLinearMinimizer.h.

Constructor & Destructor Documentation

DGtal::AngleLinearMinimizerByGradientDescent::AngleLinearMinimizerByGradientDescent ( double  step = 0.1)

Default constructor. Does nothing.

virtual DGtal::AngleLinearMinimizerByGradientDescent::~AngleLinearMinimizerByGradientDescent ( )

Destructor. Does nothing.

Member Function Documentation

virtual double DGtal::AngleLinearMinimizerByGradientDescent::lastDelta ( ) const

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.

an upper bound on the norm of the last displacement.

Reimplemented from DGtal::AngleLinearMinimizer.

virtual void DGtal::AngleLinearMinimizerByGradientDescent::oneStep ( unsigned int  i1,
unsigned int  i2 

The method which performs the optimization effectively. Use a relaxation technique. The optimization is performed on values [i1] included to [i2] excluded.

i1the first value to be optimized (between 0 and 'size()-1').
i2the value after the last to be optimized (between 0 and 'size()-1').

Reimplemented from DGtal::AngleLinearMinimizer.

virtual void DGtal::AngleLinearMinimizerByGradientDescent::selfDisplay ( std::ostream &  aStream) const

Writes/Displays the object on an output stream.

aStreamthe output stream where the object is written.

Field Documentation

double DGtal::AngleLinearMinimizerByGradientDescent::myStep

The step for the gradient descent.

Definition at line 421 of file AngleLinearMinimizer.h.

The documentation for this class was generated from the following file: