DGtal  1.3.beta
Simple2x2DetComputer.h
1 
17 #pragma once
18 
31 #if defined(Simple2x2DetComputer_RECURSES)
32 #error Recursive header files inclusion detected in Simple2x2DetComputer.h
33 #else // defined(Simple2x2DetComputer_RECURSES)
34 
35 #define Simple2x2DetComputer_RECURSES
36 
37 #if !defined Simple2x2DetComputer_h
38 
39 #define Simple2x2DetComputer_h
40 
42 // Inclusions
43 #include <iostream>
44 #include "DGtal/base/Common.h"
45 
46 #include "DGtal/kernel/NumberTraits.h"
47 #include "DGtal/kernel/CEuclideanRing.h"
49 
50 namespace DGtal
51 {
52 
54  // template class Simple2x2DetComputer
91  template <typename TArgumentInteger, typename TResultInteger = TArgumentInteger>
93  {
94  // ----------------------- Types ------------------------------------
95  public:
99  typedef TArgumentInteger ArgumentInteger;
109 
113  typedef TResultInteger ResultInteger;
115 
124 
125  // ----------------------- Standard services ------------------------------
126  public:
127 
132 
137  Simple2x2DetComputer ( const Simple2x2DetComputer & other );
138 
145 
150 
151  // ----------------------- Interface --------------------------------------
152  public:
153 
160  void init(const ArgumentInteger& aA, const ArgumentInteger& aB);
161 
170  ResultInteger operator()(const ArgumentInteger& aX, const ArgumentInteger& aY) const;
171 
182  const ArgumentInteger& aX, const ArgumentInteger& aY);
183 
188  void selfDisplay ( std::ostream & out ) const;
189 
194  bool isValid() const;
195 
196  // ------------------------- Private Datas --------------------------------
197  private:
211  mutable ResultInteger myAY;
215  mutable ResultInteger myBX;
216 
217  // ------------------------- Hidden services ------------------------------
218  protected:
219 
220 
221  // ------------------------- Internals ------------------------------------
222  private:
223 
224  }; // end of class Simple2x2DetComputer
225 
226 
233  template <typename TI, typename TO>
234  std::ostream&
235  operator<< ( std::ostream & out, const Simple2x2DetComputer<TI,TO> & object );
236 
237 } // namespace DGtal
238 
239 
241 // Includes inline functions.
242 #include "DGtal/geometry/tools/determinant/Simple2x2DetComputer.ih"
243 
244 // //
246 
247 #endif // !defined Simple2x2DetComputer_h
248 
249 #undef Simple2x2DetComputer_RECURSES
250 #endif // else defined(Simple2x2DetComputer_RECURSES)
DGtal::Simple2x2DetComputer
Aim: Small class useful to compute the determinant of a 2x2 matrix from its four coefficients,...
Definition: Simple2x2DetComputer.h:92
DGtal::Simple2x2DetComputer::Integer
ArgumentInteger Integer
Definition: Simple2x2DetComputer.h:104
DGtal::Simple2x2DetComputer::~Simple2x2DetComputer
~Simple2x2DetComputer()
DGtal::Simple2x2DetComputer::myA
ResultInteger myA
Definition: Simple2x2DetComputer.h:202
DGtal::Simple2x2DetComputer::Simple2x2DetComputer
Simple2x2DetComputer()
DGtal::Simple2x2DetComputer::operator=
Simple2x2DetComputer & operator=(const Simple2x2DetComputer &other)
DGtal::Simple2x2DetComputer::operator()
ResultInteger operator()(const ArgumentInteger &aX, const ArgumentInteger &aY) const
DGtal::operator<<
std::ostream & operator<<(std::ostream &out, const ATu0v1< TKSpace, TLinearAlgebra > &object)
DGtal::Simple2x2DetComputer::Value
ResultInteger Value
Definition: Simple2x2DetComputer.h:119
DGtal::Simple2x2DetComputer::myAY
ResultInteger myAY
Definition: Simple2x2DetComputer.h:211
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
DGtal::concepts::CEuclideanRing
Aim: Defines the mathematical concept equivalent to a unitary commutative ring with a division operat...
Definition: CEuclideanRing.h:87
DGtal::Simple2x2DetComputer::selfDisplay
void selfDisplay(std::ostream &out) const
DGtal::Simple2x2DetComputer::myB
ResultInteger myB
Definition: Simple2x2DetComputer.h:207
DGtal::Simple2x2DetComputer::init
void init(const ArgumentInteger &aA, const ArgumentInteger &aB)
DGtal::Simple2x2DetComputer::isValid
bool isValid() const
DGtal::Simple2x2DetComputer::ArgumentInteger
TArgumentInteger ArgumentInteger
Definition: Simple2x2DetComputer.h:99
DGtal::Simple2x2DetComputer::BOOST_CONCEPT_ASSERT
BOOST_CONCEPT_ASSERT((concepts::CEuclideanRing< ArgumentInteger >))
DGtal::Simple2x2DetComputer::ResultInteger
TResultInteger ResultInteger
Definition: Simple2x2DetComputer.h:113
DGtal::Simple2x2DetComputer::result_type
ResultInteger result_type
Definition: Simple2x2DetComputer.h:123
DGtal::Simple2x2DetComputer::argument_type
ArgumentInteger argument_type
Definition: Simple2x2DetComputer.h:108
DGtal::Simple2x2DetComputer::myBX
ResultInteger myBX
Definition: Simple2x2DetComputer.h:215