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

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

Inheritance diagram for DGtal::TwoStepLocalLengthEstimator< TConstIterator >:
[legend]

Public Types

typedef TConstIterator ConstIterator
 
typedef double Quantity
 

Public Member Functions

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

Private Member Functions

 TwoStepLocalLengthEstimator (const TwoStepLocalLengthEstimator &other)
 
TwoStepLocalLengthEstimatoroperator= (const TwoStepLocalLengthEstimator &other)
 

Private Attributes

double myH
 
ConstIterator myBeginIt
 
ConstIterator myEndIt
 
bool myIsInitBefore
 
double myWeightDirect
 
double myWeightDiagonal
 

Detailed Description

template<typename TConstIterator>
class DGtal::TwoStepLocalLengthEstimator< 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 'TwoStepLocalLengthEstimator'

Model of CGlobalCurveGeometricEstimator

Template Parameters
TConstIteratora model of CConstIteratorOnArrows.

Definition at line 65 of file TwoStepLocalLengthEstimator.h.

Member Typedef Documentation

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

Definition at line 72 of file TwoStepLocalLengthEstimator.h.

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

Definition at line 74 of file TwoStepLocalLengthEstimator.h.

Constructor & Destructor Documentation

template<typename TConstIterator>
DGtal::TwoStepLocalLengthEstimator< TConstIterator >::TwoStepLocalLengthEstimator ( const double  wdirect,
const double  wdiag 
)
inline

Default Constructor.

Definition at line 80 of file TwoStepLocalLengthEstimator.h.

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

Destructor.

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

Copy constructor.

Parameters
otherthe object to clone. Forbidden by default.

Member Function Documentation

template<typename TConstIterator>
Quantity DGtal::TwoStepLocalLengthEstimator< 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::TwoStepLocalLengthEstimator< TConstIterator >::init ( const double  h,
const ConstIterator itb,
const ConstIterator ite,
const bool &  isClosed 
)

Initialize the measure computation.

Parameters
hgrid size (must be >0).
itbbegin iterator
iteend iterator
isClosedtrue if the input range is closed.
template<typename TConstIterator>
bool DGtal::TwoStepLocalLengthEstimator< TConstIterator >::isValid ( ) const

Checks the validity/consistency of the object.

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

Assignment.

Parameters
otherthe object to copy.
Returns
a reference on 'this'. Forbidden by default.
template<typename TConstIterator>
void DGtal::TwoStepLocalLengthEstimator< 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::TwoStepLocalLengthEstimator< TConstIterator >::myBeginIt
private

Copy of the range.

Definition at line 136 of file TwoStepLocalLengthEstimator.h.

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

Definition at line 137 of file TwoStepLocalLengthEstimator.h.

template<typename TConstIterator>
double DGtal::TwoStepLocalLengthEstimator< TConstIterator >::myH
private
template<typename TConstIterator>
bool DGtal::TwoStepLocalLengthEstimator< TConstIterator >::myIsInitBefore
private
template<typename TConstIterator>
double DGtal::TwoStepLocalLengthEstimator< TConstIterator >::myWeightDiagonal
private

Definition at line 144 of file TwoStepLocalLengthEstimator.h.

template<typename TConstIterator>
double DGtal::TwoStepLocalLengthEstimator< TConstIterator >::myWeightDirect
private

Weights.

Definition at line 143 of file TwoStepLocalLengthEstimator.h.


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