DGtal
2.2.0
Toggle main menu visibility
Loading...
Searching...
No Matches
Simple2x2DetComputer.h
1
16
17
#pragma once
18
30
31
#if defined(Simple2x2DetComputer_RECURSES)
32
#error Recursive header files inclusion detected in Simple2x2DetComputer.h
33
#else
// defined(Simple2x2DetComputer_RECURSES)
35
#define Simple2x2DetComputer_RECURSES
36
37
#if !defined Simple2x2DetComputer_h
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>
92
class
Simple2x2DetComputer
93
{
94
// ----------------------- Types ------------------------------------
95
public
:
99
typedef
TArgumentInteger
ArgumentInteger
;
100
BOOST_CONCEPT_ASSERT
((
concepts::CEuclideanRing<ArgumentInteger>
));
104
typedef
ArgumentInteger
Integer
;
108
typedef
ArgumentInteger
argument_type
;
109
113
typedef
TResultInteger
ResultInteger
;
114
BOOST_CONCEPT_ASSERT
((
concepts::CEuclideanRing<ArgumentInteger>
));
115
119
typedef
ResultInteger
Value
;
123
typedef
ResultInteger
result_type
;
124
125
// ----------------------- Standard services ------------------------------
126
public
:
127
131
Simple2x2DetComputer
();
132
137
Simple2x2DetComputer
(
const
Simple2x2DetComputer
& other );
138
144
Simple2x2DetComputer
&
operator=
(
const
Simple2x2DetComputer
& other );
145
149
~Simple2x2DetComputer
();
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
181
ResultInteger
operator()
(
const
ArgumentInteger
& aA,
const
ArgumentInteger
& aB,
182
const
ArgumentInteger
& aX,
const
ArgumentInteger
& aY);
183
188
void
selfDisplay
( std::ostream & out )
const
;
189
194
bool
isValid
()
const
;
195
196
// ------------------------- Private Data --------------------------------
197
private
:
202
ResultInteger
myA
;
207
ResultInteger
myB
;
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:93
DGtal::Simple2x2DetComputer< Integer >::Value
ResultInteger Value
Definition
Simple2x2DetComputer.h:119
DGtal::Simple2x2DetComputer< Integer >::myA
ResultInteger myA
Definition
Simple2x2DetComputer.h:202
DGtal::Simple2x2DetComputer< Integer >::Integer
ArgumentInteger Integer
Definition
Simple2x2DetComputer.h:104
DGtal::Simple2x2DetComputer< Integer >::result_type
ResultInteger result_type
Definition
Simple2x2DetComputer.h:123
DGtal::Simple2x2DetComputer::Simple2x2DetComputer
Simple2x2DetComputer(const Simple2x2DetComputer &other)
DGtal::Simple2x2DetComputer< Integer >::myAY
ResultInteger myAY
Definition
Simple2x2DetComputer.h:211
DGtal::Simple2x2DetComputer::operator()
ResultInteger operator()(const ArgumentInteger &aA, const ArgumentInteger &aB, const ArgumentInteger &aX, const ArgumentInteger &aY)
DGtal::Simple2x2DetComputer::isValid
bool isValid() const
DGtal::Simple2x2DetComputer< Integer >::myBX
ResultInteger myBX
Definition
Simple2x2DetComputer.h:215
DGtal::Simple2x2DetComputer::operator()
ResultInteger operator()(const ArgumentInteger &aX, const ArgumentInteger &aY) const
DGtal::Simple2x2DetComputer< Integer >::argument_type
ArgumentInteger argument_type
Definition
Simple2x2DetComputer.h:108
DGtal::Simple2x2DetComputer::~Simple2x2DetComputer
~Simple2x2DetComputer()
DGtal::Simple2x2DetComputer< Integer >::myB
ResultInteger myB
Definition
Simple2x2DetComputer.h:207
DGtal::Simple2x2DetComputer::selfDisplay
void selfDisplay(std::ostream &out) const
DGtal::Simple2x2DetComputer< Integer >::ArgumentInteger
Integer ArgumentInteger
Definition
Simple2x2DetComputer.h:99
DGtal::Simple2x2DetComputer::Simple2x2DetComputer
Simple2x2DetComputer()
DGtal::Simple2x2DetComputer::BOOST_CONCEPT_ASSERT
BOOST_CONCEPT_ASSERT((concepts::CEuclideanRing< ArgumentInteger >))
DGtal::Simple2x2DetComputer::operator=
Simple2x2DetComputer & operator=(const Simple2x2DetComputer &other)
DGtal::Simple2x2DetComputer< Integer >::ResultInteger
Integer ResultInteger
Definition
Simple2x2DetComputer.h:113
DGtal::Simple2x2DetComputer::init
void init(const ArgumentInteger &aA, const ArgumentInteger &aB)
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
Definition
ClosedIntegerHalfPlane.h:49
DGtal::operator<<
std::ostream & operator<<(std::ostream &out, const ClosedIntegerHalfPlane< TSpace > &object)
DGtal::concepts::CEuclideanRing
Aim: Defines the mathematical concept equivalent to a unitary commutative ring with a division operat...
Definition
CEuclideanRing.h:88
src
DGtal
geometry
tools
determinant
Simple2x2DetComputer.h
Generated on
for DGtal by
1.18.0