DGtal
2.2.0
Toggle main menu visibility
Loading...
Searching...
No Matches
CCellularGridSpaceND.h
1
16
17
#pragma once
18
30
31
#if defined(CCellularGridSpaceND_RECURSES)
32
#error Recursive header files inclusion detected in CCellularGridSpaceND.h
33
#else
// defined(CCellularGridSpaceND_RECURSES)
35
#define CCellularGridSpaceND_RECURSES
36
37
#if !defined CCellularGridSpaceND_h
39
#define CCellularGridSpaceND_h
40
42
// Inclusions
43
#include <iostream>
44
#include "DGtal/base/Common.h"
45
#include "DGtal/base/CConstSinglePassRange.h"
46
#include "DGtal/kernel/CInteger.h"
47
#include "DGtal/kernel/CUnsignedNumber.h"
48
#include "DGtal/kernel/CIntegralNumber.h"
49
#include "DGtal/topology/CPreCellularGridSpaceND.h"
50
52
53
// @since 0.8 In DGtal::concepts
54
namespace
DGtal
{
55
namespace
concepts
{
56
58
// class CCellularGridSpaceND
161
template
<
typename
T>
162
struct
CCellularGridSpaceND
163
:
CPreCellularGridSpaceND
<T>
164
{
165
// ----------------------- Concept checks ------------------------------
166
public
:
167
typedef
typename
T::Size
Size
;
168
169
BOOST_CONCEPT_ASSERT
((
CUnsignedNumber< Size >
));
170
BOOST_CONCEPT_ASSERT
((
CIntegralNumber< Size >
));
171
172
BOOST_CONCEPT_USAGE
(
CCellularGridSpaceND
)
173
{
174
ConceptUtils::sameType
(
myBool
,
myX
.init(
myP1
,
myP2
,
myBool
) );
175
checkConstConstraints
();
176
}
177
void
checkConstConstraints
()
const
178
{
179
ConceptUtils::sameType
(
mySize
,
myX
.size(
myDim
) );
180
ConceptUtils::sameType
(
myInteger
,
myX
.min(
myDim
) );
181
ConceptUtils::sameType
(
myInteger
,
myX
.max(
myDim
) );
182
ConceptUtils::sameType
(
myP1
,
myX
.lowerBound() );
183
ConceptUtils::sameType
(
myP2
,
myX
.upperBound() );
184
ConceptUtils::sameType
(
myCell
,
myX
.lowerCell() );
185
ConceptUtils::sameType
(
myCell
,
myX
.upperCell() );
186
ConceptUtils::sameType
(
myBool
,
myX
.isSpaceClosed() );
187
// -------------------- Unsigned cell geometry services --------------------
188
ConceptUtils::sameType
(
myCell
,
myX
.uFirst(
myCell
) );
189
ConceptUtils::sameType
(
myCell
,
myX
.uLast(
myCell
) );
190
ConceptUtils::sameType
(
myCell
,
myX
.uGetMax(
myCell
,
myDim
) );
191
ConceptUtils::sameType
(
myCell
,
myX
.uGetMin(
myCell
,
myDim
) );
192
ConceptUtils::sameType
(
myInteger
,
myX
.uDistanceToMax(
myCell
,
myDim
) );
193
ConceptUtils::sameType
(
myInteger
,
myX
.uDistanceToMin(
myCell
,
myDim
) );
194
// -------------------- Signed cell geometry services --------------------
195
ConceptUtils::sameType
(
mySCell
,
myX
.sFirst(
mySCell
) );
196
ConceptUtils::sameType
(
mySCell
,
myX
.sLast(
mySCell
) );
197
ConceptUtils::sameType
(
mySCell
,
myX
.sGetMax(
mySCell
,
myDim
) );
198
ConceptUtils::sameType
(
mySCell
,
myX
.sGetMin(
mySCell
,
myDim
) );
199
ConceptUtils::sameType
(
myInteger
,
myX
.sDistanceToMax(
mySCell
,
myDim
) );
200
ConceptUtils::sameType
(
myInteger
,
myX
.sDistanceToMin(
mySCell
,
myDim
) );
201
202
}
203
// ------------------------- Private Data --------------------------------
204
private
:
205
T
myX
;
// do not require T to be default constructible.
206
typename
CPreCellularGridSpaceND<T>::Integer
myInteger
;
207
Size
mySize
;
208
Dimension
myDim
;
209
typename
CPreCellularGridSpaceND<T>::Point
myP1
,
myP2
;
210
typename
CPreCellularGridSpaceND<T>::Cell
myCell
;
211
typename
CPreCellularGridSpaceND<T>::SCell
mySCell
;
212
bool
myBool
;
213
214
// ------------------------- Internals ------------------------------------
215
private
:
216
217
};
// end of concept CCellularGridSpaceND
218
219
}
// namespace concepts
220
}
// namespace DGtal
221
222
// //
224
225
#endif
// !defined CCellularGridSpaceND_h
226
227
#undef CCellularGridSpaceND_RECURSES
228
#endif
// else defined(CCellularGridSpaceND_RECURSES)
DGtal::concepts::ConceptUtils::sameType
void sameType(const T &, const T &)
Definition
ConceptUtils.h:117
DGtal::concepts
Aim: Gathers several functions useful for concept checks.
Definition
CPositiveIrreducibleFraction.h:54
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
Definition
ClosedIntegerHalfPlane.h:49
DGtal::Dimension
DGtal::uint32_t Dimension
Definition
Common.h:119
DGtal::concepts::CCellularGridSpaceND
Aim: This concept describes a cellular grid space in nD. In these spaces obtained by cartesian produc...
Definition
CCellularGridSpaceND.h:164
DGtal::concepts::CCellularGridSpaceND::mySize
Size mySize
Definition
CCellularGridSpaceND.h:207
DGtal::concepts::CCellularGridSpaceND::checkConstConstraints
void checkConstConstraints() const
Definition
CCellularGridSpaceND.h:177
DGtal::concepts::CCellularGridSpaceND::BOOST_CONCEPT_ASSERT
BOOST_CONCEPT_ASSERT((CUnsignedNumber< Size >))
DGtal::concepts::CCellularGridSpaceND::myP2
CPreCellularGridSpaceND< T >::Point myP2
Definition
CCellularGridSpaceND.h:209
DGtal::concepts::CCellularGridSpaceND::myBool
bool myBool
Definition
CCellularGridSpaceND.h:212
DGtal::concepts::CCellularGridSpaceND::myX
T myX
Definition
CCellularGridSpaceND.h:205
DGtal::concepts::CCellularGridSpaceND::myCell
CPreCellularGridSpaceND< T >::Cell myCell
Definition
CCellularGridSpaceND.h:210
DGtal::concepts::CCellularGridSpaceND::BOOST_CONCEPT_ASSERT
BOOST_CONCEPT_ASSERT((CIntegralNumber< Size >))
DGtal::concepts::CCellularGridSpaceND::mySCell
CPreCellularGridSpaceND< T >::SCell mySCell
Definition
CCellularGridSpaceND.h:211
DGtal::concepts::CCellularGridSpaceND::myDim
Dimension myDim
Definition
CCellularGridSpaceND.h:208
DGtal::concepts::CCellularGridSpaceND::BOOST_CONCEPT_USAGE
BOOST_CONCEPT_USAGE(CCellularGridSpaceND)
Definition
CCellularGridSpaceND.h:172
DGtal::concepts::CCellularGridSpaceND::myInteger
CPreCellularGridSpaceND< T >::Integer myInteger
Definition
CCellularGridSpaceND.h:206
DGtal::concepts::CCellularGridSpaceND::myP1
CPreCellularGridSpaceND< T >::Point myP1
Definition
CCellularGridSpaceND.h:209
DGtal::concepts::CCellularGridSpaceND::Size
T::Size Size
Definition
CCellularGridSpaceND.h:167
DGtal::concepts::CIntegralNumber
Aim: Concept checking for Integral Numbers. Models of this concept should be listed in NumberTraits c...
Definition
CIntegralNumber.h:102
DGtal::concepts::CPreCellularGridSpaceND
Aim: This concept describes an unbounded cellular grid space in nD. In these spaces obtained by carte...
Definition
CPreCellularGridSpaceND.h:287
DGtal::concepts::CPreCellularGridSpaceND::Point
T::Point Point
Definition
CPreCellularGridSpaceND.h:298
DGtal::concepts::CPreCellularGridSpaceND::Cell
T::Cell Cell
Definition
CPreCellularGridSpaceND.h:293
DGtal::concepts::CPreCellularGridSpaceND::Integer
T::Integer Integer
Definition
CPreCellularGridSpaceND.h:290
DGtal::concepts::CPreCellularGridSpaceND::SCell
T::SCell SCell
Definition
CPreCellularGridSpaceND.h:294
DGtal::concepts::CUnsignedNumber
Aim: Concept checking for Unsigned numbers. Models of this concept should be listed in NumberTraits c...
Definition
CUnsignedNumber.h:95
src
DGtal
topology
CCellularGridSpaceND.h
Generated on
for DGtal by
1.18.0