DGtal 1.3.0
Loading...
Searching...
No Matches
MeasureOfStraightLines.h
1
29#if defined(MeasureOfStraightLines_RECURSES)
30#error Recursive header files inclusion detected in MeasureOfStraightLines.h
31#else // defined(MeasureOfStraightLines_RECURSES)
33#define MeasureOfStraightLines_RECURSES
34
35#if !defined MeasureOfStraightLines_h
37#define MeasureOfStraightLines_h
38
40// Inclusions
41#include <iostream>
42#include <vector>
43#include "DGtal/base/Common.h"
45
46namespace 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)
The aim of this class is to compute the measure in the Lebesgues sense of the set of straight lines a...
double computeMeasure(const std::vector< double > &a, const std::vector< double > &b)
double computeCentroidA(const std::vector< double > &a, const std::vector< double > &b)
double __computeCentroidEdgeApprox_b(double a0, double b0, double a1, double b1)
double computeCentroidEdge_a(double a0, double b0, double a1, double b1)
void setEpsilon(const double aValue)
void selfDisplay(std::ostream &out) const
MeasureOfStraightLines(const MeasureOfStraightLines &other)
double __computeCentroidSquare_b(double x1, double y1, double x2, double y2)
MeasureOfStraightLines & operator=(const MeasureOfStraightLines &other)
int sign(const double a)
double computeMeasureEdge(double a0, double b0, double a1, double b1)
double __computeCentroidTriApprox_b(double a0, double b0, double a1, double b1)
double computeCentroidB(const std::vector< double > &a, const std::vector< double > &b)
double computeCentroidEdge_b(double a0, double b0, double a1, double b1)
DGtal is the top-level namespace which contains all DGtal functions and types.
std::ostream & operator<<(std::ostream &out, const ClosedIntegerHalfPlane< TSpace > &object)