DGtal
0.6.devel
|
#include <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 |
Reimplemented in DGtal::BLUELocalLengthEstimator< TConstIterator >, and DGtal::RosenProffittLocalLengthEstimator< TConstIterator >.
Definition at line 72 of file TwoStepLocalLengthEstimator.h.
typedef double DGtal::TwoStepLocalLengthEstimator< TConstIterator >::Quantity |
Reimplemented in DGtal::BLUELocalLengthEstimator< TConstIterator >, and DGtal::RosenProffittLocalLengthEstimator< TConstIterator >.
Definition at line 74 of file TwoStepLocalLengthEstimator.h.
|
inline |
Default Constructor.
Definition at line 80 of file TwoStepLocalLengthEstimator.h.
|
inline |
|
private |
Copy constructor.
other | the object to clone. Forbidden by default. |
|
inline |
Computation of the l1 length of the curve. Complexity: O(|Range|)
Definition at line 76 of file TwoStepLocalLengthEstimator.ih.
|
inline |
Initialize the measure computation.
h | grid size (must be >0). |
itb | begin iterator |
ite | end iterator |
closed | true if the input range is closed. |
Definition at line 62 of file TwoStepLocalLengthEstimator.ih.
|
inline |
Checks the validity/consistency of the object.
Definition at line 141 of file TwoStepLocalLengthEstimator.ih.
|
private |
Assignment.
other | the object to copy. |
|
inline |
Writes/Displays the object on an output stream.
out | the output stream where the object is written. |
Reimplemented in DGtal::RosenProffittLocalLengthEstimator< TConstIterator >, and DGtal::BLUELocalLengthEstimator< TConstIterator >.
Definition at line 125 of file TwoStepLocalLengthEstimator.ih.
|
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.