DGtal 1.3.0
Loading...
Searching...
No Matches
CCellularGridSpaceND.h
1
17#pragma once
18
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
54namespace DGtal {
55 namespace concepts {
56
58// class CCellularGridSpaceND
161template <typename T>
164{
165 // ----------------------- Concept checks ------------------------------
166public:
167 typedef typename T::Size Size;
168
171
173 {
176 }
178 {
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 --------------------
192 ConceptUtils::sameType( myInteger, myX.uDistanceToMax( myCell, myDim ) );
193 ConceptUtils::sameType( myInteger, myX.uDistanceToMin( myCell, myDim ) );
194 // -------------------- Signed cell geometry services --------------------
199 ConceptUtils::sameType( myInteger, myX.sDistanceToMax( mySCell, myDim ) );
200 ConceptUtils::sameType( myInteger, myX.sDistanceToMin( mySCell, myDim ) );
201
202}
203 // ------------------------- Private Datas --------------------------------
204private:
205 T myX; // do not require T to be default constructible.
212 bool myBool;
213
214 // ------------------------- Internals ------------------------------------
215private:
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)
void sameType(const T &, const T &)
Definition: ConceptUtils.h:117
DGtal is the top-level namespace which contains all DGtal functions and types.
DGtal::uint32_t Dimension
Definition: Common.h:137
Aim: This concept describes a cellular grid space in nD. In these spaces obtained by cartesian produc...
BOOST_CONCEPT_ASSERT((CUnsignedNumber< Size >))
CPreCellularGridSpaceND< T >::Point myP2
CPreCellularGridSpaceND< T >::Cell myCell
BOOST_CONCEPT_ASSERT((CIntegralNumber< Size >))
CPreCellularGridSpaceND< T >::SCell mySCell
CPreCellularGridSpaceND< T >::Integer myInteger
CPreCellularGridSpaceND< T >::Point myP1
Aim: Concept checking for Integral Numbers. Models of this concept should be listed in NumberTraits c...
Aim: This concept describes an unbounded cellular grid space in nD. In these spaces obtained by carte...
Aim: Concept checking for Unsigned numbers. Models of this concept should be listed in NumberTraits c...