DGtal  1.3.beta
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.
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::CPreCellularGridSpaceND
Aim: This concept describes an unbounded cellular grid space in nD. In these spaces obtained by carte...
Definition: CPreCellularGridSpaceND.h:285
DGtal::concepts::CCellularGridSpaceND::myInteger
CPreCellularGridSpaceND< T >::Integer myInteger
Definition: CCellularGridSpaceND.h:206
DGtal::concepts::CUnsignedNumber
Aim: Concept checking for Unsigned numbers. Models of this concept should be listed in NumberTraits c...
Definition: CUnsignedNumber.h:94
DGtal::concepts::CCellularGridSpaceND::BOOST_CONCEPT_ASSERT
BOOST_CONCEPT_ASSERT((CUnsignedNumber< Size >))
DGtal::concepts::CCellularGridSpaceND::checkConstConstraints
void checkConstConstraints() const
Definition: CCellularGridSpaceND.h:177
DGtal::concepts::CCellularGridSpaceND::mySCell
CPreCellularGridSpaceND< T >::SCell mySCell
Definition: CCellularGridSpaceND.h:211
DGtal::concepts::CCellularGridSpaceND
Aim: This concept describes a cellular grid space in nD. In these spaces obtained by cartesian produc...
Definition: CCellularGridSpaceND.h:162
DGtal::Dimension
DGtal::uint32_t Dimension
Definition: Common.h:137
DGtal::concepts::CCellularGridSpaceND::myBool
bool myBool
Definition: CCellularGridSpaceND.h:212
DGtal::concepts::CCellularGridSpaceND::BOOST_CONCEPT_USAGE
BOOST_CONCEPT_USAGE(CCellularGridSpaceND)
Definition: CCellularGridSpaceND.h:172
Size
HalfEdgeDataStructure::Size Size
Definition: testHalfEdgeDataStructure.cpp:50
DGtal::concepts::CCellularGridSpaceND::Size
T::Size Size
Definition: CCellularGridSpaceND.h:167
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
DGtal::concepts::CCellularGridSpaceND::myP2
CPreCellularGridSpaceND< T >::Point myP2
Definition: CCellularGridSpaceND.h:209
DGtal::concepts::CCellularGridSpaceND::myX
T myX
Definition: CCellularGridSpaceND.h:205
DGtal::concepts::CCellularGridSpaceND::myCell
CPreCellularGridSpaceND< T >::Cell myCell
Definition: CCellularGridSpaceND.h:210
DGtal::concepts::CPreCellularGridSpaceND::SCell
T::SCell SCell
Definition: CPreCellularGridSpaceND.h:294
DGtal::concepts::ConceptUtils::sameType
void sameType(const T &, const T &)
Definition: ConceptUtils.h:117
DGtal::concepts::CPreCellularGridSpaceND::Cell
T::Cell Cell
Definition: CPreCellularGridSpaceND.h:293
DGtal::concepts::CCellularGridSpaceND::myDim
Dimension myDim
Definition: CCellularGridSpaceND.h:208
DGtal::concepts::CCellularGridSpaceND::myP1
CPreCellularGridSpaceND< T >::Point myP1
Definition: CCellularGridSpaceND.h:209
DGtal::concepts::CPreCellularGridSpaceND::Integer
T::Integer Integer
Definition: CPreCellularGridSpaceND.h:290
DGtal::concepts::CIntegralNumber
Aim: Concept checking for Integral Numbers. Models of this concept should be listed in NumberTraits c...
Definition: CIntegralNumber.h:101
DGtal::concepts::CCellularGridSpaceND::mySize
Size mySize
Definition: CCellularGridSpaceND.h:207
DGtal::concepts::CPreCellularGridSpaceND::Point
T::Point Point
Definition: CPreCellularGridSpaceND.h:298