DGtal
1.0.beta
|
#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) | |
L1LengthEstimator & | operator= (const L1LengthEstimator &other) |
Private Attributes | |
double | myH |
ConstIterator | myBeginIt |
ConstIterator | myEndIt |
bool | myIsInitBefore |
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
TConstIterator | a model of CConstIteratorOnArrows. |
Definition at line 67 of file L1LengthEstimator.h.
typedef TConstIterator DGtal::L1LengthEstimator< TConstIterator >::ConstIterator |
Definition at line 74 of file L1LengthEstimator.h.
typedef double DGtal::L1LengthEstimator< TConstIterator >::Quantity |
Definition at line 76 of file L1LengthEstimator.h.
DGtal::L1LengthEstimator< TConstIterator >::L1LengthEstimator | ( | ) |
Default Constructor.
DGtal::L1LengthEstimator< TConstIterator >::~L1LengthEstimator | ( | ) |
Destructor.
|
private |
Copy constructor.
other | the object to clone. Forbidden by default. |
Quantity DGtal::L1LengthEstimator< TConstIterator >::eval | ( | ) | const |
Computation of the l1 length of the curve. Complexity: O(|Range|)
void DGtal::L1LengthEstimator< TConstIterator >::init | ( | const double | h, |
const ConstIterator & | itb, | ||
const ConstIterator & | ite | ||
) |
Initialize the measure computation.
h | grid size (must be >0). |
itb | begin iterator |
ite | end iterator |
bool DGtal::L1LengthEstimator< TConstIterator >::isValid | ( | ) | const |
Checks the validity/consistency of the object.
|
private |
Assignment.
other | the object to copy. |
void DGtal::L1LengthEstimator< TConstIterator >::selfDisplay | ( | std::ostream & | out | ) | const |
Writes/Displays the object on an output stream.
out | the output stream where the object is written. |
|
private |
Copy of the range.
Definition at line 133 of file L1LengthEstimator.h.
|
private |
Definition at line 134 of file L1LengthEstimator.h.
|
private |
Grid size.
Definition at line 130 of file L1LengthEstimator.h.
|
private |
Boolean to make sure that init() has been called before eval().
Definition at line 137 of file L1LengthEstimator.h.