DGtal  1.3.beta
L1LengthEstimator.h
1 
17 #pragma once
18 
34 #if defined(L1LengthEstimator_RECURSES)
35 #error Recursive header files inclusion detected in L1LengthEstimator.h
36 #else // defined(L1LengthEstimator_RECURSES)
37 
38 #define L1LengthEstimator_RECURSES
39 
40 #if !defined L1LengthEstimator_h
41 
42 #define L1LengthEstimator_h
43 
45 // Inclusions
46 #include <iostream>
47 #include "DGtal/base/Common.h"
48 #include "DGtal/base/Circulator.h"
50 
51 namespace DGtal
52 {
53 
55  // template class L1LengthEstimator
66  template <typename TConstIterator>
68  {
69  // ----------------------- Standard services ------------------------------
70  public:
71 
72 
74  typedef TConstIterator ConstIterator;
75 
76  typedef double Quantity;
77 
78 
82  L1LengthEstimator() = default;
83 
84 
88  ~L1LengthEstimator() = default;
89 
95  L1LengthEstimator ( const L1LengthEstimator & other ) = delete;
96 
103  L1LengthEstimator & operator= ( const L1LengthEstimator & other ) = delete;
104 
105 
106  // ----------------------- Interface --------------------------------------
107  public:
108 
118  Quantity eval( const ConstIterator& itb,
119  const ConstIterator& ite,
120  const double h ) const;
121 
126  void selfDisplay ( std::ostream & out ) const;
127 
132  bool isValid() const;
133 
134  }; // end of class L1LengthEstimator
135 
136 
143  template <typename T>
144  std::ostream&
145  operator<< ( std::ostream & out, const L1LengthEstimator<T> & object );
146 
147 } // namespace DGtal
148 
149 
151 // Includes inline functions.
152 #include "DGtal/geometry/curves/estimation/L1LengthEstimator.ih"
153 
154 // //
156 
157 #endif // !defined L1LengthEstimator_h
158 
159 #undef L1LengthEstimator_RECURSES
160 #endif // else defined(L1LengthEstimator_RECURSES)
DGtal::L1LengthEstimator::selfDisplay
void selfDisplay(std::ostream &out) const
DGtal::L1LengthEstimator::operator=
L1LengthEstimator & operator=(const L1LengthEstimator &other)=delete
DGtal::L1LengthEstimator
Aim: a simple model of CGlobalCurveEstimator that compute the length of a curve using the l_1 metric ...
Definition: L1LengthEstimator.h:67
DGtal::L1LengthEstimator::eval
Quantity eval(const ConstIterator &itb, const ConstIterator &ite, const double h) const
DGtal::L1LengthEstimator::~L1LengthEstimator
~L1LengthEstimator()=default
DGtal::L1LengthEstimator::ConstIterator
TConstIterator ConstIterator
Definition: L1LengthEstimator.h:74
DGtal::operator<<
std::ostream & operator<<(std::ostream &out, const ATu0v1< TKSpace, TLinearAlgebra > &object)
DGtal::L1LengthEstimator::isValid
bool isValid() const
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
DGtal::L1LengthEstimator::Quantity
double Quantity
Definition: L1LengthEstimator.h:76
DGtal::L1LengthEstimator::L1LengthEstimator
L1LengthEstimator()=default