DGtal 1.3.0
Loading...
Searching...
No Matches
Filtered2x2DetComputer.h
1
17#pragma once
18
31#if defined(Filtered2x2DetComputer_RECURSES)
32#error Recursive header files inclusion detected in Filtered2x2DetComputer.h
33#else // defined(Filtered2x2DetComputer_RECURSES)
35#define Filtered2x2DetComputer_RECURSES
36
37#if !defined Filtered2x2DetComputer_h
39#define Filtered2x2DetComputer_h
40
42// Inclusions
43#include <iostream>
44#include "DGtal/base/Common.h"
45
46#include "DGtal/geometry/tools/determinant/C2x2DetComputer.h"
48
49namespace DGtal
50{
51
53 // template class Filtered2x2DetComputer
82 template <typename TDetComputer>
84 {
85 // ----------------------- Types ------------------------------------
86 public:
88
92 typedef typename TDetComputer::ArgumentInteger ArgumentInteger;
93 //NB. TDetComputer should take input coefficients of type float, double or long double
94 //this type must adhere to IEC-559 / IEEE-754 standard.
95 BOOST_STATIC_ASSERT(( std::numeric_limits<ArgumentInteger>::is_iec559 ));
96
105
109 typedef typename TDetComputer::ResultInteger ResultInteger;
118
119 // ----------------------- Standard services ------------------------------
120 public:
121
128 void init(const ArgumentInteger& aA, const ArgumentInteger& aB);
129
139
150 const ArgumentInteger& aX, const ArgumentInteger& aY);
151
152 // ----------------------- Interface --------------------------------------
153 public:
154
159 void selfDisplay ( std::ostream & out ) const;
160
165 bool isValid() const;
166
167 // ------------------------- Protected Datas ------------------------------
168 private:
169 // ------------------------- Private Datas --------------------------------
170 private:
171
186 mutable TDetComputer myDetComputer;
187
188 // ------------------------- Internals ------------------------------------
189 private:
190
191 }; // end of class Filtered2x2DetComputer
192
193
200 template <typename T>
201 std::ostream&
202 operator<< ( std::ostream & out, const Filtered2x2DetComputer<T> & object );
203
204} // namespace DGtal
205
206
208// Includes inline functions.
209#include "DGtal/geometry/tools/determinant/Filtered2x2DetComputer.ih"
210
211// //
213
214#endif // !defined Filtered2x2DetComputer_h
215
216#undef Filtered2x2DetComputer_RECURSES
217#endif // else defined(Filtered2x2DetComputer_RECURSES)
Aim: Class that provides a way of computing the sign of the determinant of a 2x2 matrix from its four...
TDetComputer::ResultInteger ResultInteger
void selfDisplay(std::ostream &out) const
BOOST_STATIC_ASSERT((std::numeric_limits< ArgumentInteger >::is_iec559))
ResultInteger operator()(const ArgumentInteger &aA, const ArgumentInteger &aB, const ArgumentInteger &aX, const ArgumentInteger &aY)
BOOST_CONCEPT_ASSERT((C2x2DetComputer< TDetComputer >))
ResultInteger operator()(const ArgumentInteger &aX, const ArgumentInteger &aY) const
void init(const ArgumentInteger &aA, const ArgumentInteger &aB)
TDetComputer::ArgumentInteger ArgumentInteger
DGtal is the top-level namespace which contains all DGtal functions and types.
std::ostream & operator<<(std::ostream &out, const ClosedIntegerHalfPlane< TSpace > &object)
Aim: This concept gathers all models that are able to compute the (sign of the) determinant of a 2x2 ...