DGtal  1.3.beta
MeasureOfStraightLines.h
1 
29 #if defined(MeasureOfStraightLines_RECURSES)
30 #error Recursive header files inclusion detected in MeasureOfStraightLines.h
31 #else // defined(MeasureOfStraightLines_RECURSES)
32 
33 #define MeasureOfStraightLines_RECURSES
34 
35 #if !defined MeasureOfStraightLines_h
36 
37 #define MeasureOfStraightLines_h
38 
40 // Inclusions
41 #include <iostream>
42 #include <vector>
43 #include "DGtal/base/Common.h"
45 
46 namespace DGtal
47 {
48 
50  // class MeasureOfStraightLines
80  {
81  // ----------------------- Standard services ------------------------------
82  public:
83 
88 
89 
90 
95 
96  // ----------------------- Interface --------------------------------------
97  public:
98 
103  void selfDisplay( std::ostream & out ) const;
104 
109  bool isValid() const;
110 
111 
123  double computeMeasure(const std::vector<double> &a,const std::vector<double> &b);
124 
125 
138  double computeCentroidA(const std::vector<double> &a,const std::vector<double> &b);
139 
140 
155  double computeCentroidB(const std::vector<double> &a,const std::vector<double> &b);
156 
157 
164  void setEpsilon(const double aValue);
165 
166 
167  // ------------------------- Protected Datas ------------------------------
168  private:
169  // ------------------------- Private Datas --------------------------------
170  private:
171  double myEpsilon;
172 
173  // ------------------------- Hidden services ------------------------------
174  protected:
175 
176  private:
177 
184 
192 
193 
194  // ------------------------- Internals ------------------------------------
195  private:
196 
207  double computeMeasureEdge ( double a0,double b0, double a1, double b1 );
208 
219  double computeCentroidEdge_a ( double a0,double b0, double a1, double b1 );
220 
231  double computeCentroidEdge_b ( double a0,double b0, double a1, double b1 );
232 
243  double __computeCentroidTriApprox_b ( double a0, double b0,double a1,double b1 );
244 
254  double __computeCentroidEdgeApprox_b ( double a0, double b0,double a1,double b1 );
255 
256 
266  double __computeCentroidSquare_b ( double x1, double y1, double x2,double y2 );
267 
268 
273  int sign ( const double a );
274 
275 
276 
277  }; // end of class MeasureOfStraightLines
278 
279 
286  std::ostream&
287  operator<<( std::ostream & out, const MeasureOfStraightLines & object );
288 
289 
290 } // namespace DGtal
291 
292 
294 // Includes inline functions/methods if necessary.
295 #include "DGtal/math/MeasureOfStraightLines.ih"
296 
297 // //
299 
300 #endif // !defined MeasureOfStraightLines_h
301 
302 #undef MeasureOfStraightLines_RECURSES
303 #endif // else defined(MeasureOfStraightLines_RECURSES)
DGtal::MeasureOfStraightLines
The aim of this class is to compute the measure in the Lebesgues sense of the set of straight lines a...
Definition: MeasureOfStraightLines.h:79
DGtal::MeasureOfStraightLines::__computeCentroidSquare_b
double __computeCentroidSquare_b(double x1, double y1, double x2, double y2)
DGtal::MeasureOfStraightLines::computeCentroidB
double computeCentroidB(const std::vector< double > &a, const std::vector< double > &b)
DGtal::MeasureOfStraightLines::__computeCentroidEdgeApprox_b
double __computeCentroidEdgeApprox_b(double a0, double b0, double a1, double b1)
DGtal::operator<<
std::ostream & operator<<(std::ostream &out, const ATu0v1< TKSpace, TLinearAlgebra > &object)
DGtal::MeasureOfStraightLines::operator=
MeasureOfStraightLines & operator=(const MeasureOfStraightLines &other)
DGtal::MeasureOfStraightLines::isValid
bool isValid() const
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
DGtal::MeasureOfStraightLines::computeCentroidA
double computeCentroidA(const std::vector< double > &a, const std::vector< double > &b)
DGtal::MeasureOfStraightLines::selfDisplay
void selfDisplay(std::ostream &out) const
DGtal::MeasureOfStraightLines::MeasureOfStraightLines
MeasureOfStraightLines()
DGtal::MeasureOfStraightLines::computeMeasureEdge
double computeMeasureEdge(double a0, double b0, double a1, double b1)
DGtal::MeasureOfStraightLines::myEpsilon
double myEpsilon
Definition: MeasureOfStraightLines.h:171
DGtal::MeasureOfStraightLines::computeMeasure
double computeMeasure(const std::vector< double > &a, const std::vector< double > &b)
DGtal::MeasureOfStraightLines::sign
int sign(const double a)
DGtal::MeasureOfStraightLines::__computeCentroidTriApprox_b
double __computeCentroidTriApprox_b(double a0, double b0, double a1, double b1)
DGtal::MeasureOfStraightLines::~MeasureOfStraightLines
~MeasureOfStraightLines()
DGtal::MeasureOfStraightLines::computeCentroidEdge_b
double computeCentroidEdge_b(double a0, double b0, double a1, double b1)
DGtal::MeasureOfStraightLines::setEpsilon
void setEpsilon(const double aValue)
DGtal::MeasureOfStraightLines::computeCentroidEdge_a
double computeCentroidEdge_a(double a0, double b0, double a1, double b1)