DGtal
2.2.0
Toggle main menu visibility
Loading...
Searching...
No Matches
InGeneralizedDiskOfGivenRadius.h
1
16
17
#pragma once
18
30
31
#if defined(InGeneralizedDiskOfGivenRadius_RECURSES)
32
#error Recursive header files inclusion detected in InGeneralizedDiskOfGivenRadius.h
33
#else
// defined(InGeneralizedDiskOfGivenRadius_RECURSES)
35
#define InGeneralizedDiskOfGivenRadius_RECURSES
36
37
#if !defined InGeneralizedDiskOfGivenRadius_h
39
#define InGeneralizedDiskOfGivenRadius_h
40
42
// Inclusions
43
#include <iostream>
44
#include <array>
45
#include "DGtal/base/Common.h"
46
47
#include "DGtal/geometry/tools/determinant/C2x2DetComputer.h"
48
#include "DGtal/geometry/tools/determinant/Simple2x2DetComputer.h"
50
51
namespace
DGtal
52
{
53
55
// template class InGeneralizedDiskOfGivenRadius
125
template
<
typename
TPo
int
,
typename
TDetComputer>
126
class
InGeneralizedDiskOfGivenRadius
127
{
128
// ----------------------- Inner types ------------------------------------
129
public
:
133
typedef
TPoint
Point
;
134
138
typedef
std::array<Point,2>
PointArray
;
142
typedef
typename
PointArray::size_type
SizeArray
;
146
static
const
SizeArray
size
= 2;
147
151
typedef
TDetComputer
DetComputer
;
152
BOOST_CONCEPT_ASSERT
((
C2x2DetComputer<DetComputer>
));
156
typedef
typename
DetComputer::ArgumentInteger
Integer
;
160
typedef
typename
DetComputer::ResultInteger
Value
;
166
typedef
Simple2x2DetComputer<Integer>
AreaFunctor
;
167
168
// ----------------------- Standard services ------------------------------
169
public
:
170
187
InGeneralizedDiskOfGivenRadius
(
bool
isPositive =
true
,
188
const
Integer
& aNum2 =
NumberTraits<Integer>::ONE
,
189
const
Integer
& aDen2 =
NumberTraits<Integer>::ZERO
);
190
195
InGeneralizedDiskOfGivenRadius
(
const
InGeneralizedDiskOfGivenRadius
& other );
196
202
InGeneralizedDiskOfGivenRadius
&
operator=
(
const
InGeneralizedDiskOfGivenRadius
& other );
203
204
// ----------------------- Interface --------------------------------------
205
public
:
213
void
init
(
const
Point
& aP,
const
Point
& aQ );
214
220
void
init
(
const
PointArray
& aA);
221
243
Value
operator()
(
const
Point
& aR )
const
;
244
249
void
selfDisplay
( std::ostream & out )
const
;
250
259
bool
lengthIsValid
(
const
Integer
& aL2)
const
;
260
268
bool
isValid
()
const
;
269
270
// ----------------------- Internals --------------------------------------
271
public
:
275
void
finalizeComputation
()
const
;
276
277
// ------------------------- Private Data --------------------------------
278
private
:
282
Integer
myNum2
;
286
Integer
myDen2
;
295
bool
myIsPositive
;
302
DetComputer
myDetComputer
;
303
307
mutable
Point
myP
;
311
mutable
Point
myQ
;
315
mutable
Point
myR
;
319
mutable
Integer
myComputedNum2
;
323
mutable
Integer
myComputedDen2
;
327
mutable
Integer
myPQ0
;
331
mutable
Integer
myPQ1
;
335
mutable
Integer
myPQnorm
;
339
mutable
Integer
myQR0
;
343
mutable
Integer
myQR1
;
347
mutable
Integer
myQRnorm
;
351
mutable
Integer
myRP0
;
355
mutable
Integer
myRP1
;
359
mutable
Integer
myRPnorm
;
363
mutable
Integer
myArea
;
368
mutable
AreaFunctor
myAreaFunctor
;
369
370
};
// end of class InGeneralizedDiskOfGivenRadius
371
372
379
template
<
typename
TPo
int
,
typename
TDetComputer>
380
std::ostream&
381
operator<<
( std::ostream & out,
const
InGeneralizedDiskOfGivenRadius<TPoint, TDetComputer>
&
object
);
382
383
384
}
// namespace DGtal
385
386
388
// Includes inline functions.
389
#include "DGtal/geometry/tools/determinant/InGeneralizedDiskOfGivenRadius.ih"
390
391
// //
393
394
#endif
// !defined InGeneralizedDiskOfGivenRadius_h
395
396
#undef InGeneralizedDiskOfGivenRadius_RECURSES
397
#endif
// else defined(InGeneralizedDiskOfGivenRadius_RECURSES)
DGtal::InGeneralizedDiskOfGivenRadius
Aim: This class implements an orientation functor that provides a way to determine the position of a ...
Definition
InGeneralizedDiskOfGivenRadius.h:127
DGtal::InGeneralizedDiskOfGivenRadius::myRPnorm
Integer myRPnorm
Definition
InGeneralizedDiskOfGivenRadius.h:359
DGtal::InGeneralizedDiskOfGivenRadius::myDen2
Integer myDen2
Definition
InGeneralizedDiskOfGivenRadius.h:286
DGtal::InGeneralizedDiskOfGivenRadius::myQR1
Integer myQR1
Definition
InGeneralizedDiskOfGivenRadius.h:343
DGtal::InGeneralizedDiskOfGivenRadius::myArea
Integer myArea
Definition
InGeneralizedDiskOfGivenRadius.h:363
DGtal::InGeneralizedDiskOfGivenRadius::Point
TPoint Point
Definition
InGeneralizedDiskOfGivenRadius.h:133
DGtal::InGeneralizedDiskOfGivenRadius::myP
Point myP
Definition
InGeneralizedDiskOfGivenRadius.h:307
DGtal::InGeneralizedDiskOfGivenRadius::myNum2
Integer myNum2
Definition
InGeneralizedDiskOfGivenRadius.h:282
DGtal::InGeneralizedDiskOfGivenRadius::DetComputer
TDetComputer DetComputer
Definition
InGeneralizedDiskOfGivenRadius.h:151
DGtal::InGeneralizedDiskOfGivenRadius::myRP1
Integer myRP1
Definition
InGeneralizedDiskOfGivenRadius.h:355
DGtal::InGeneralizedDiskOfGivenRadius::operator=
InGeneralizedDiskOfGivenRadius & operator=(const InGeneralizedDiskOfGivenRadius &other)
DGtal::InGeneralizedDiskOfGivenRadius::init
void init(const Point &aP, const Point &aQ)
DGtal::InGeneralizedDiskOfGivenRadius::size
static const SizeArray size
Definition
InGeneralizedDiskOfGivenRadius.h:146
DGtal::InGeneralizedDiskOfGivenRadius::lengthIsValid
bool lengthIsValid(const Integer &aL2) const
DGtal::InGeneralizedDiskOfGivenRadius::myQR0
Integer myQR0
Definition
InGeneralizedDiskOfGivenRadius.h:339
DGtal::InGeneralizedDiskOfGivenRadius::myR
Point myR
Definition
InGeneralizedDiskOfGivenRadius.h:315
DGtal::InGeneralizedDiskOfGivenRadius::myPQ0
Integer myPQ0
Definition
InGeneralizedDiskOfGivenRadius.h:327
DGtal::InGeneralizedDiskOfGivenRadius::InGeneralizedDiskOfGivenRadius
InGeneralizedDiskOfGivenRadius(bool isPositive=true, const Integer &aNum2=NumberTraits< Integer >::ONE, const Integer &aDen2=NumberTraits< Integer >::ZERO)
DGtal::InGeneralizedDiskOfGivenRadius::myAreaFunctor
AreaFunctor myAreaFunctor
Definition
InGeneralizedDiskOfGivenRadius.h:368
DGtal::InGeneralizedDiskOfGivenRadius::Integer
DetComputer::ArgumentInteger Integer
Definition
InGeneralizedDiskOfGivenRadius.h:156
DGtal::InGeneralizedDiskOfGivenRadius::myQ
Point myQ
Definition
InGeneralizedDiskOfGivenRadius.h:311
DGtal::InGeneralizedDiskOfGivenRadius::selfDisplay
void selfDisplay(std::ostream &out) const
DGtal::InGeneralizedDiskOfGivenRadius::isValid
bool isValid() const
DGtal::InGeneralizedDiskOfGivenRadius::InGeneralizedDiskOfGivenRadius
InGeneralizedDiskOfGivenRadius(const InGeneralizedDiskOfGivenRadius &other)
DGtal::InGeneralizedDiskOfGivenRadius::finalizeComputation
void finalizeComputation() const
DGtal::InGeneralizedDiskOfGivenRadius::myIsPositive
bool myIsPositive
Definition
InGeneralizedDiskOfGivenRadius.h:295
DGtal::InGeneralizedDiskOfGivenRadius::operator()
Value operator()(const Point &aR) const
DGtal::InGeneralizedDiskOfGivenRadius::myPQ1
Integer myPQ1
Definition
InGeneralizedDiskOfGivenRadius.h:331
DGtal::InGeneralizedDiskOfGivenRadius::myQRnorm
Integer myQRnorm
Definition
InGeneralizedDiskOfGivenRadius.h:347
DGtal::InGeneralizedDiskOfGivenRadius::myComputedDen2
Integer myComputedDen2
Definition
InGeneralizedDiskOfGivenRadius.h:323
DGtal::InGeneralizedDiskOfGivenRadius::myRP0
Integer myRP0
Definition
InGeneralizedDiskOfGivenRadius.h:351
DGtal::InGeneralizedDiskOfGivenRadius::BOOST_CONCEPT_ASSERT
BOOST_CONCEPT_ASSERT((C2x2DetComputer< DetComputer >))
DGtal::InGeneralizedDiskOfGivenRadius::myComputedNum2
Integer myComputedNum2
Definition
InGeneralizedDiskOfGivenRadius.h:319
DGtal::InGeneralizedDiskOfGivenRadius::AreaFunctor
Simple2x2DetComputer< Integer > AreaFunctor
Definition
InGeneralizedDiskOfGivenRadius.h:166
DGtal::InGeneralizedDiskOfGivenRadius::myPQnorm
Integer myPQnorm
Definition
InGeneralizedDiskOfGivenRadius.h:335
DGtal::InGeneralizedDiskOfGivenRadius::init
void init(const PointArray &aA)
DGtal::InGeneralizedDiskOfGivenRadius::myDetComputer
DetComputer myDetComputer
Definition
InGeneralizedDiskOfGivenRadius.h:302
DGtal::InGeneralizedDiskOfGivenRadius::SizeArray
PointArray::size_type SizeArray
Definition
InGeneralizedDiskOfGivenRadius.h:142
DGtal::InGeneralizedDiskOfGivenRadius::Value
DetComputer::ResultInteger Value
Definition
InGeneralizedDiskOfGivenRadius.h:160
DGtal::InGeneralizedDiskOfGivenRadius::PointArray
std::array< Point, 2 > PointArray
Definition
InGeneralizedDiskOfGivenRadius.h:138
DGtal::Simple2x2DetComputer
Aim: Small class useful to compute the determinant of a 2x2 matrix from its four coefficients,...
Definition
Simple2x2DetComputer.h:93
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::C2x2DetComputer
Aim: This concept gathers all models that are able to compute the (sign of the) determinant of a 2x2 ...
Definition
C2x2DetComputer.h:108
DGtal::NumberTraitsImpl< std::decay< T >::type >::ONE
static const T ONE
Definition
NumberTraits.h:103
DGtal::NumberTraitsImpl< std::decay< T >::type >::ZERO
static const T ZERO
Definition
NumberTraits.h:100
src
DGtal
geometry
tools
determinant
InGeneralizedDiskOfGivenRadius.h
Generated on
for DGtal by
1.18.0