DGtal  0.9.2
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)
34 
35 #define CCellularGridSpaceND_RECURSES
36 
37 #if !defined CCellularGridSpaceND_h
38 
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>
164 {
165  // ----------------------- Concept checks ------------------------------
166 public:
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 --------------------
188  ConceptUtils::sameType( myCell, myX.uFirst( 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 --------------------
199  ConceptUtils::sameType( myInteger, myX.sDistanceToMax( mySCell, myDim ) );
200  ConceptUtils::sameType( myInteger, myX.sDistanceToMin( mySCell, myDim ) );
201 
202 }
203  // ------------------------- Private Datas --------------------------------
204 private:
205  T myX; // do not require T to be default constructible.
207  Size mySize;
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)
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...
DGtal::uint32_t Dimension
Definition: Common.h:113
CPreCellularGridSpaceND< T >::Integer myInteger
CPreCellularGridSpaceND< T >::SCell mySCell
void sameType(const T &t1, const T &t2)
CPreCellularGridSpaceND< T >::Cell myCell
Aim: Concept checking for Integral Numbers. Models of this concept should be listed in NumberTraits c...
CPreCellularGridSpaceND< T >::Point myP1
DGtal is the top-level namespace which contains all DGtal functions and types.
CPreCellularGridSpaceND< T >::Point myP2
Aim: This concept describes a cellular grid space in nD. In these spaces obtained by cartesian produc...
BOOST_CONCEPT_ASSERT((CUnsignedNumber< Size >))