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

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). More...

#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
 Grid size. More...
 
ConstIterator myBeginIt
 Copy of the range. More...
 
ConstIterator myEndIt
 
bool myIsInitBefore
 Boolean to make sure that init() has been called before eval(). More...
 
double myWeightDirect
 Weights. More...
 
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

◆ ConstIterator

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

Definition at line 72 of file TwoStepLocalLengthEstimator.h.

◆ Quantity

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

Definition at line 74 of file TwoStepLocalLengthEstimator.h.

Constructor & Destructor Documentation

◆ TwoStepLocalLengthEstimator() [1/2]

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

Default Constructor.

Definition at line 80 of file TwoStepLocalLengthEstimator.h.

◆ ~TwoStepLocalLengthEstimator()

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

Destructor.

◆ TwoStepLocalLengthEstimator() [2/2]

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

◆ eval()

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.

◆ init()

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.

◆ isValid()

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.

◆ operator=()

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.

◆ selfDisplay()

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

◆ myBeginIt

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

Copy of the range.

Definition at line 136 of file TwoStepLocalLengthEstimator.h.

◆ myEndIt

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

Definition at line 137 of file TwoStepLocalLengthEstimator.h.

◆ myH

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

◆ myIsInitBefore

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

◆ myWeightDiagonal

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

Definition at line 144 of file TwoStepLocalLengthEstimator.h.

◆ myWeightDirect

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: