DGtal  1.4.beta
PlaneProbingEstimatorHelper.h
1 
17 #pragma once
18 
31 #if defined(PlaneProbingEstimatorHelper_RECURSES)
32 #error Recursive header files inclusion detected in PlaneProbingEstimatorHelper.h
33 #else // defined(PlaneProbingEstimatorHelper_RECURSES)
35 #define PlaneProbingEstimatorHelper_RECURSES
36 
37 #if !defined PlaneProbingEstimatorHelper_h
39 #define PlaneProbingEstimatorHelper_h
40 
42 // Inclusions
43 #include <array>
44 #include <cassert>
45 #include "DGtal/math/linalg/SimpleMatrix.h"
46 #include "DGtal/base/Common.h"
47 #include "DGtal/kernel/CInteger.h"
49 
50 namespace DGtal
51 {
52  namespace detail
53  {
60  template < typename Point >
61  typename Point::Coordinate squaredNorm (Point const& aPoint);
62 
69  template < int N, typename T >
70  T determinant (const T aMatrix[N][N]);
71 
78  template < typename Point >
79  inline
80  typename Point::Coordinate distToSphere (std::array<Point, 5> const& aPoints);
81 
89  template < typename Point >
90  inline
91  bool isBasisReduced (Point const& aU, Point const& aV);
92 
94  // template class PointOnProbingRay
106  template < typename Integer = int >
108  {
110 
111  // ----------------------- Public types ------------------------------
112  public:
113  using Permutation = std::array<int, 3>;
114 
115  public:
119  PointOnProbingRay () = default;
120 
127  PointOnProbingRay (Permutation const& aSigma, Integer const& aIndex = Integer(0));
128 
133 
137  Permutation const& sigma () const;
138 
143  int sigma (int aIndex) const;
144 
148  Integer const& index () const;
149 
157  bool operator== (PointOnProbingRay const& aRay) const;
158 
165  bool operator!= (PointOnProbingRay const& aRay) const;
166 
176  bool operator<= (PointOnProbingRay const& aRay) const;
177 
182  PointOnProbingRay next (Integer const& aInc) const;
183 
188  PointOnProbingRay previous (Integer const& aDec) const;
189 
190  private:
193  }; // end of class PointOnProbingRay
194 
202  template < typename Integer >
203  std::ostream& operator<< (std::ostream& aOs, PointOnProbingRay<Integer> const& aRay);
204  } // namespace detail
205 } // namespace DGtal
206 
208 // Includes inline functions.
209 #include "DGtal/geometry/helpers/PlaneProbingEstimatorHelper.ih"
210 
211 // //
213 
214 #endif // !defined PlaneProbingEstimatorHelper_h
215 
216 #undef PlaneProbingEstimatorHelper_RECURSES
217 #endif // else defined(PlaneProbingEstimatorHelper_RECURSES)
bool operator<=(PointOnProbingRay const &aRay) const
PointOnProbingRay next(Integer const &aInc) const
PointOnProbingRay previous(Integer const &aDec) const
PointOnProbingRay getBase() const
BOOST_CONCEPT_ASSERT((concepts::CInteger< Integer >))
int sigma(int aIndex) const
Integer const & index() const
bool operator!=(PointOnProbingRay const &aRay) const
bool operator==(PointOnProbingRay const &aRay) const
PointOnProbingRay(Permutation const &aSigma, Integer const &aIndex=Integer(0))
Permutation const & sigma() const
std::ostream & operator<<(std::ostream &aOs, PointOnProbingRay< Integer > const &aRay)
T determinant(const T aMatrix[N][N])
Point::Coordinate squaredNorm(Point const &aPoint)
bool isBasisReduced(Point const &aU, Point const &aV)
Point::Coordinate distToSphere(std::array< Point, 5 > const &aPoints)
DGtal is the top-level namespace which contains all DGtal functions and types.
Aim: Concept checking for Integer Numbers. More precisely, this concept is a refinement of both CEucl...
Definition: CInteger.h:88
MyPointD Point
Definition: testClone2.cpp:383
const Point aPoint(3, 4)