DGtal 1.3.0
Loading...
Searching...
No Matches
Public Types | Public 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 >:
DGtal::BLUELocalLengthEstimator< TConstIterator > DGtal::RosenProffittLocalLengthEstimator< TConstIterator >

Public Types

typedef TConstIterator ConstIterator
 
typedef double Quantity
 

Public Member Functions

 TwoStepLocalLengthEstimator ()=delete
 
 TwoStepLocalLengthEstimator (const double wdirect, const double wdiag)
 
 ~TwoStepLocalLengthEstimator ()=default
 
 TwoStepLocalLengthEstimator (const TwoStepLocalLengthEstimator &other)=delete
 
TwoStepLocalLengthEstimatoroperator= (const TwoStepLocalLengthEstimator &other)=delete
 
Quantity eval (const ConstIterator &itb, const ConstIterator &ite, const double h=1.) const
 
void selfDisplay (std::ostream &out) const
 
bool isValid () const
 

Private Attributes

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/3]

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

Default Constructor.

◆ TwoStepLocalLengthEstimator() [2/3]

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

Constructor with direct and diagonal weights.

Parameters
wdirectdirect weight
wdiagdiagonal weight

◆ ~TwoStepLocalLengthEstimator()

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

Destructor.

◆ TwoStepLocalLengthEstimator() [3/3]

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

Copy constructor.

Parameters
otherthe object to clone. Forbidden by default.

Member Function Documentation

◆ eval()

template<typename TConstIterator >
Quantity DGtal::TwoStepLocalLengthEstimator< TConstIterator >::eval ( const ConstIterator itb,
const ConstIterator ite,
const double  h = 1. 
) const

Computation of the l1 length of the curve. Iterated structure must contain pairs. The direct or diagonal case is resolved using the dot function on the second element of pairs. Complexity: O(|Range|)

Parameters
itbbegin iterator
iteend iterator
hgrid size (must be > 0).
Returns
the curve length.

◆ 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.

Referenced by DGtal::BLUELocalLengthEstimator< TConstIterator >::selfDisplay(), and DGtal::RosenProffittLocalLengthEstimator< TConstIterator >::selfDisplay().

◆ operator=()

template<typename TConstIterator >
TwoStepLocalLengthEstimator & DGtal::TwoStepLocalLengthEstimator< TConstIterator >::operator= ( const TwoStepLocalLengthEstimator< TConstIterator > &  other)
delete

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

◆ myWeightDiagonal

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

Definition at line 143 of file TwoStepLocalLengthEstimator.h.

◆ myWeightDirect

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

Weights.

Definition at line 142 of file TwoStepLocalLengthEstimator.h.


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