DGtal 1.3.0
Loading...
Searching...
No Matches
SimpleIncremental2x2DetComputer.h
1
17#pragma once
18
31#if defined(SimpleIncremental2x2DetComputer_RECURSES)
32#error Recursive header files inclusion detected in SimpleIncremental2x2DetComputer.h
33#else // defined(SimpleIncremental2x2DetComputer_RECURSES)
35#define SimpleIncremental2x2DetComputer_RECURSES
36
37#if !defined SimpleIncremental2x2DetComputer_h
39#define SimpleIncremental2x2DetComputer_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
50namespace DGtal
51{
52
54 // template class SimpleIncremental2x2DetComputer
92 template <typename TArgumentInteger, typename TResultInteger = TArgumentInteger>
94 {
95 // ----------------------- Types ----------------------------------------
96 public:
100 typedef TArgumentInteger ArgumentInteger;
110
114 typedef TResultInteger ResultInteger;
116
125
126 // ----------------------- Standard services ------------------------------
127 public:
128
133
139
146
151
152 // ----------------------- Interface --------------------------------------
153 public:
154
161 void init(const ArgumentInteger& aA, const ArgumentInteger& aB);
162
172
183 const ArgumentInteger& aX, const ArgumentInteger& aY);
184
185
190 void selfDisplay ( std::ostream & out ) const;
191
196 bool isValid() const;
197
198 // ------------------------- Private Datas --------------------------------
199 private:
254
256 // ------------------------- Hidden services ------------------------------
257 protected:
258
259
260 // ------------------------- Internals ------------------------------------
261 private:
262
268 void partialComputation() const;
269
270 }; // end of class SimpleIncremental2x2DetComputer
271
272
279 template <typename TI, typename TO>
280 std::ostream&
281 operator<< ( std::ostream & out, const SimpleIncremental2x2DetComputer<TI,TO> & object );
282
283} // namespace DGtal
284
285
287// Includes inline functions.
288#include "DGtal/geometry/tools/determinant/SimpleIncremental2x2DetComputer.ih"
289
290// //
292
293#endif // !defined SimpleIncremental2x2DetComputer_h
294
295#undef SimpleIncremental2x2DetComputer_RECURSES
296#endif // else defined(SimpleIncremental2x2DetComputer_RECURSES)
Aim: Small class useful to compute, in an incremental way, the determinant of a 2x2 matrix from its f...
BOOST_CONCEPT_ASSERT((concepts::CEuclideanRing< ArgumentInteger >))
SimpleIncremental2x2DetComputer & operator=(const SimpleIncremental2x2DetComputer &other)
ResultInteger operator()(const ArgumentInteger &aX, const ArgumentInteger &aY) const
ResultInteger operator()(const ArgumentInteger &aA, const ArgumentInteger &aB, const ArgumentInteger &aX, const ArgumentInteger &aY)
void selfDisplay(std::ostream &out) const
void init(const ArgumentInteger &aA, const ArgumentInteger &aB)
SimpleIncremental2x2DetComputer(const SimpleIncremental2x2DetComputer &other)
DGtal is the top-level namespace which contains all DGtal functions and types.
std::ostream & operator<<(std::ostream &out, const ClosedIntegerHalfPlane< TSpace > &object)
Aim: Defines the mathematical concept equivalent to a unitary commutative ring with a division operat...