DGtal  1.4.beta
InHalfPlaneBySimple3x3Matrix.h
1 
17 #pragma once
18 
31 #if defined(InHalfPlaneBySimple3x3Matrix_RECURSES)
32 #error Recursive header files inclusion detected in InHalfPlaneBySimple3x3Matrix.h
33 #else // defined(InHalfPlaneBySimple3x3Matrix_RECURSES)
35 #define InHalfPlaneBySimple3x3Matrix_RECURSES
36 
37 #if !defined InHalfPlaneBySimple3x3Matrix_h
39 #define InHalfPlaneBySimple3x3Matrix_h
40 
42 // Inclusions
43 #include <iostream>
44 #include <array>
45 #include "DGtal/base/Common.h"
46 
47 #include "DGtal/kernel/NumberTraits.h"
48 #include "DGtal/kernel/CEuclideanRing.h"
49 #include "DGtal/math/linalg/SimpleMatrix.h"
51 
52 namespace DGtal
53 {
54 
56  // template class InHalfPlaneBySimple3x3Matrix
90  template <typename TPoint, typename TInteger>
92  {
93  // ----------------------- Types ------------------------------------
94  public:
95 
99  typedef TPoint Point;
100 
104  typedef std::array<Point,2> PointArray;
108  typedef typename PointArray::size_type SizeArray;
112  static const SizeArray size = 2;
113 
120  typedef TInteger Integer;
122 
127 
131  typedef Integer Value;
132 
133  // ----------------------- Interface --------------------------------------
134  public:
135 
141  void init(const Point& aP, const Point& aQ);
142 
147  void init(const PointArray& aA);
148 
159  Value operator()(const Point& aR) const;
160 
165  void selfDisplay ( std::ostream & out ) const;
166 
171  bool isValid() const;
172 
173  // ------------------------- Private Datas --------------------------------
174  private:
175 
179  mutable Matrix myMatrix;
180 
181 
182  }; // end of class InHalfPlaneBySimple3x3Matrix
183 
184 
191  template <typename TPoint, typename TInteger>
192  std::ostream&
193  operator<< ( std::ostream & out, const InHalfPlaneBySimple3x3Matrix<TPoint, TInteger> & object );
194 
195 } // namespace DGtal
196 
197 
199 // Includes inline functions.
200 #include "DGtal/geometry/tools/determinant/InHalfPlaneBySimple3x3Matrix.ih"
201 
202 // //
204 
205 #endif // !defined InHalfPlaneBySimple3x3Matrix_h
206 
207 #undef InHalfPlaneBySimple3x3Matrix_RECURSES
208 #endif // else defined(InHalfPlaneBySimple3x3Matrix_RECURSES)
Aim: Class that implements an orientation functor, ie. it provides a way to compute the orientation o...
void init(const Point &aP, const Point &aQ)
void selfDisplay(std::ostream &out) const
Value operator()(const Point &aR) const
void init(const PointArray &aA)
BOOST_CONCEPT_ASSERT((concepts::CEuclideanRing< Integer >))
DGtal is the top-level namespace which contains all DGtal functions and types.
std::ostream & operator<<(std::ostream &out, const ATu0v1< TKSpace, TLinearAlgebra > &object)
Aim: Defines the mathematical concept equivalent to a unitary commutative ring with a division operat...