DGtal
0.9.4.1
|
#include <DGtal/geometry/curves/estimation/TwoStepLocalLengthEstimator.h>
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) | |
TwoStepLocalLengthEstimator & | operator= (const TwoStepLocalLengthEstimator &other) |
Private Attributes | |
double | myH |
ConstIterator | myBeginIt |
ConstIterator | myEndIt |
bool | myIsInitBefore |
double | myWeightDirect |
double | myWeightDiagonal |
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
TConstIterator | a model of CConstIteratorOnArrows. |
Definition at line 65 of file TwoStepLocalLengthEstimator.h.
typedef TConstIterator DGtal::TwoStepLocalLengthEstimator< TConstIterator >::ConstIterator |
Definition at line 72 of file TwoStepLocalLengthEstimator.h.
typedef double DGtal::TwoStepLocalLengthEstimator< TConstIterator >::Quantity |
Definition at line 74 of file TwoStepLocalLengthEstimator.h.
|
inline |
Default Constructor.
Definition at line 80 of file TwoStepLocalLengthEstimator.h.
DGtal::TwoStepLocalLengthEstimator< TConstIterator >::~TwoStepLocalLengthEstimator | ( | ) |
Destructor.
|
private |
Copy constructor.
other | the object to clone. Forbidden by default. |
Quantity DGtal::TwoStepLocalLengthEstimator< TConstIterator >::eval | ( | ) | const |
Computation of the l1 length of the curve. Complexity: O(|Range|)
void DGtal::TwoStepLocalLengthEstimator< TConstIterator >::init | ( | const double | h, |
const ConstIterator & | itb, | ||
const ConstIterator & | ite, | ||
const bool & | isClosed | ||
) |
Initialize the measure computation.
h | grid size (must be >0). |
itb | begin iterator |
ite | end iterator |
isClosed | true if the input range is closed. |
bool DGtal::TwoStepLocalLengthEstimator< TConstIterator >::isValid | ( | ) | const |
Checks the validity/consistency of the object.
|
private |
Assignment.
other | the object to copy. |
void DGtal::TwoStepLocalLengthEstimator< 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 136 of file TwoStepLocalLengthEstimator.h.
|
private |
Definition at line 137 of file TwoStepLocalLengthEstimator.h.
|
private |
Grid size.
Definition at line 133 of file TwoStepLocalLengthEstimator.h.
Referenced by DGtal::BLUELocalLengthEstimator< TConstIterator >::selfDisplay(), and DGtal::RosenProffittLocalLengthEstimator< TConstIterator >::selfDisplay().
|
private |
Boolean to make sure that init() has been called before eval().
Definition at line 140 of file TwoStepLocalLengthEstimator.h.
Referenced by DGtal::BLUELocalLengthEstimator< TConstIterator >::selfDisplay(), and DGtal::RosenProffittLocalLengthEstimator< TConstIterator >::selfDisplay().
|
private |
Definition at line 144 of file TwoStepLocalLengthEstimator.h.
|
private |
Weights.
Definition at line 143 of file TwoStepLocalLengthEstimator.h.