DGtal  1.5.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)
38 #define L1LengthEstimator_RECURSES
39 
40 #if !defined L1LengthEstimator_h
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 
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)
Aim: a simple model of CGlobalCurveEstimator that compute the length of a curve using the l_1 metric ...
void selfDisplay(std::ostream &out) const
L1LengthEstimator & operator=(const L1LengthEstimator &other)=delete
L1LengthEstimator(const L1LengthEstimator &other)=delete
Quantity eval(const ConstIterator &itb, const ConstIterator &ite, const double h) const
DGtal is the top-level namespace which contains all DGtal functions and types.
std::ostream & operator<<(std::ostream &out, const ATu0v1< TKSpace, TLinearAlgebra > &object)