DGtal  0.9.3beta
Public Types | Public Member Functions | Private Member Functions | Private Attributes
DGtal::L1LengthEstimator< TConstIterator > Class Template Reference

#include <DGtal/geometry/curves/estimation/L1LengthEstimator.h>

Public Types

typedef TConstIterator ConstIterator
 
typedef double Quantity
 

Public Member Functions

 L1LengthEstimator ()
 
 ~L1LengthEstimator ()
 
void init (const double h, const ConstIterator &itb, const ConstIterator &ite)
 
Quantity eval () const
 
void selfDisplay (std::ostream &out) const
 
bool isValid () const
 

Private Member Functions

 L1LengthEstimator (const L1LengthEstimator &other)
 
L1LengthEstimatoroperator= (const L1LengthEstimator &other)
 

Private Attributes

double myH
 
ConstIterator myBeginIt
 
ConstIterator myEndIt
 
bool myIsInitBefore
 

Detailed Description

template<typename TConstIterator>
class DGtal::L1LengthEstimator< TConstIterator >

Aim: a simple model of CGlobalCurveEstimator that compute the length of a curve using the l_1 metric (just add 1/h for every step).

Description of template class 'L1LengthEstimator'

Model of CGlobalCurveGeometricEstimator

Template Parameters
TConstIteratora model of CConstIteratorOnArrows.

Definition at line 67 of file L1LengthEstimator.h.

Member Typedef Documentation

template<typename TConstIterator>
typedef TConstIterator DGtal::L1LengthEstimator< TConstIterator >::ConstIterator
Todo:
CONCEPT CHECK sur ConstIterator

Definition at line 74 of file L1LengthEstimator.h.

template<typename TConstIterator>
typedef double DGtal::L1LengthEstimator< TConstIterator >::Quantity

Definition at line 76 of file L1LengthEstimator.h.

Constructor & Destructor Documentation

template<typename TConstIterator>
DGtal::L1LengthEstimator< TConstIterator >::L1LengthEstimator ( )

Default Constructor.

template<typename TConstIterator>
DGtal::L1LengthEstimator< TConstIterator >::~L1LengthEstimator ( )

Destructor.

template<typename TConstIterator>
DGtal::L1LengthEstimator< TConstIterator >::L1LengthEstimator ( const L1LengthEstimator< TConstIterator > &  other)
private

Copy constructor.

Parameters
otherthe object to clone. Forbidden by default.

Member Function Documentation

template<typename TConstIterator>
Quantity DGtal::L1LengthEstimator< TConstIterator >::eval ( ) const

Computation of the l1 length of the curve. Complexity: O(|Range|)

Precondition
init() method must be called before.
Returns
the curve length.
template<typename TConstIterator>
void DGtal::L1LengthEstimator< TConstIterator >::init ( const double  h,
const ConstIterator itb,
const ConstIterator ite 
)

Initialize the measure computation.

Parameters
hgrid size (must be >0).
itbbegin iterator
iteend iterator
template<typename TConstIterator>
bool DGtal::L1LengthEstimator< TConstIterator >::isValid ( ) const

Checks the validity/consistency of the object.

Returns
'true' if the object is valid, 'false' otherwise.
template<typename TConstIterator>
L1LengthEstimator& DGtal::L1LengthEstimator< TConstIterator >::operator= ( const L1LengthEstimator< TConstIterator > &  other)
private

Assignment.

Parameters
otherthe object to copy.
Returns
a reference on 'this'. Forbidden by default.
template<typename TConstIterator>
void DGtal::L1LengthEstimator< TConstIterator >::selfDisplay ( std::ostream &  out) const

Writes/Displays the object on an output stream.

Parameters
outthe output stream where the object is written.

Field Documentation

template<typename TConstIterator>
ConstIterator DGtal::L1LengthEstimator< TConstIterator >::myBeginIt
private

Copy of the range.

Definition at line 133 of file L1LengthEstimator.h.

template<typename TConstIterator>
ConstIterator DGtal::L1LengthEstimator< TConstIterator >::myEndIt
private

Definition at line 134 of file L1LengthEstimator.h.

template<typename TConstIterator>
double DGtal::L1LengthEstimator< TConstIterator >::myH
private

Grid size.

Definition at line 130 of file L1LengthEstimator.h.

template<typename TConstIterator>
bool DGtal::L1LengthEstimator< TConstIterator >::myIsInitBefore
private

Boolean to make sure that init() has been called before eval().

Definition at line 137 of file L1LengthEstimator.h.


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