DGtal 1.3.0
Loading...
Searching...
No Matches
CPreCellularGridSpaceND.h
1
17#pragma once
18
33#if defined(CPreCellularGridSpaceND_RECURSES)
34#error Recursive header files inclusion detected in CPreCellularGridSpaceND.h
35#else // defined(CPreCellularGridSpaceND_RECURSES)
37#define CPreCellularGridSpaceND_RECURSES
38
39#if !defined CPreCellularGridSpaceND_h
41#define CPreCellularGridSpaceND_h
42
44// Inclusions
45#include <iostream>
46#include "DGtal/base/Common.h"
47#include "DGtal/base/CConstSinglePassRange.h"
48#include "DGtal/kernel/CInteger.h"
49#include "DGtal/kernel/CUnsignedNumber.h"
50#include "DGtal/kernel/CIntegralNumber.h"
51
53
54// @since 0.8 In DGtal::concepts
55namespace DGtal {
56 namespace concepts {
57
59// class CPreCellularGridSpaceND
284template <typename T>
287{
288 // ----------------------- Concept checks ------------------------------
289public:
290 typedef typename T::Integer Integer;
291 typedef typename T::Space Space;
292 typedef typename T::PreCellularGridSpace PreCellularGridSpace;
293 typedef typename T::Cell Cell;
294 typedef typename T::SCell SCell;
295 typedef typename T::Surfel Surfel;
296 typedef typename T::Sign Sign;
297 typedef typename T::DirIterator DirIterator;
298 typedef typename T::Point Point;
299 typedef typename T::Vector Vector;
300 typedef typename T::Cells Cells;
301 typedef typename T::SCells SCells;
302 typedef typename T::CellSet CellSet;
303 typedef typename T::SCellSet SCellSet;
304 typedef typename T::SurfelSet SurfelSet;
305 typedef int Dummy;
306 typedef typename T::template CellMap<Dummy>::Type CellMap;
307 typedef typename T::template SCellMap<Dummy>::Type SCellMap;
308 typedef typename T::template SurfelMap<Dummy>::Type SurfelMap;
309
328
330 {
331 ConceptUtils::sameType( myDim, T::dimension );
332 ConceptUtils::sameType( myDim, T::DIM );
336 }
338 {
347 ConceptUtils::sameType( myCell, myX.uPointel( myP1 ) );
348 ConceptUtils::sameType( mySCell, myX.sPointel( myP1 ) );
352 ConceptUtils::sameType( myP1, myX.uKCoords( myCell ) );
353 ConceptUtils::sameType( myP1, myX.uCoords( myCell ) );
356 ConceptUtils::sameType( myP1, myX.sKCoords( mySCell ) );
357 ConceptUtils::sameType( myP1, myX.sCoords( mySCell ) );
358 myX.uSetKCoord( myMutableCell, myDim, myInteger );
359 myX.uSetCoord( myMutableCell, myDim, myInteger );
360 myX.uSetKCoords( myMutableCell, myP1 );
361 myX.uSetCoords( myMutableCell, myP1 );
362 myX.sSetKCoord( myMutableSCell, myDim, myInteger );
363 myX.sSetCoord( myMutableSCell, myDim, myInteger );
364 myX.sSetKCoords( myMutableSCell, myP1 );
365 myX.sSetCoords( myMutableSCell, myP1 );
367 myX.sSetSign( myMutableSCell, mySign );
375 ConceptUtils::sameType( myBool, myX.uIsSurfel( myCell ) );
376 ConceptUtils::sameType( myBool, myX.sIsSurfel( mySCell ) );
381 ConceptUtils::sameType( myDirIt, myX.uOrthDirs( myCell ) );
382 ConceptUtils::sameType( myDirIt, myX.sOrthDirs( mySCell ) );
383 ConceptUtils::sameType( myDim, myX.uOrthDir( myCell ) );
384 ConceptUtils::sameType( myDim, myX.sOrthDir( mySCell ) );
385 // -------------------- Unsigned cell geometry services --------------------
390 ConceptUtils::sameType( myBool, myX.uIsInside( myCell, myDim ) );
393 ConceptUtils::sameType( myCell, myX.uTranslation( myCell, myV ) );
394 ConceptUtils::sameType( myCell, myX.uProjection( myCell, myCell, myDim ) );
395 myX.uProject( myMutableCell, myCell, myDim );
397 // -------------------- Signed cell geometry services --------------------
405 ConceptUtils::sameType( mySCell, myX.sTranslation( mySCell, myV ) );
407 myX.sProject( myMutableSCell, mySCell, myDim );
409 // ----------------------- Neighborhood services --------------------------
410 ConceptUtils::sameType( myCells, myX.uNeighborhood( myCell ) );
411 ConceptUtils::sameType( myCells, myX.uProperNeighborhood( myCell ) );
412 ConceptUtils::sameType( mySCells, myX.sNeighborhood( mySCell ) );
413 ConceptUtils::sameType( mySCells, myX.sProperNeighborhood( mySCell ) );
416 // ----------------------- Incidence services --------------------------
419 ConceptUtils::sameType( myCells, myX.uLowerIncident( myCell ) );
420 ConceptUtils::sameType( myCells, myX.uUpperIncident( myCell ) );
421 ConceptUtils::sameType( mySCells, myX.sLowerIncident( mySCell ) );
422 ConceptUtils::sameType( mySCells, myX.sUpperIncident( mySCell ) );
426 ConceptUtils::sameType( mySCell, myX.sDirectIncident( mySCell, myDim ) );
427 ConceptUtils::sameType( mySCell, myX.sIndirectIncident( mySCell, myDim ) );
428 ConceptUtils::sameType( mySCell, myX.sIndirectIncident( mySCell, myDim ) );
429 ConceptUtils::sameType( myP1, myX.interiorVoxel( mySCell) );
430 ConceptUtils::sameType( myP1, myX.exteriorVoxel( mySCell) );
431
432}
433 // ------------------------- Private Datas --------------------------------
434private:
435 T myX; // do not require T to be default constructible.
444 bool myBool;
449
450 // ------------------------- Internals ------------------------------------
451private:
452
453}; // end of concept CPreCellularGridSpaceND
454
455} // namespace concepts
456} // namespace DGtal
457
458// //
460
461#endif // !defined CPreCellularGridSpaceND_h
462
463#undef CPreCellularGridSpaceND_RECURSES
464#endif // else defined(CPreCellularGridSpaceND_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: Defines the concept describing a const single pass range.
Aim: Concept checking for Integer Numbers. More precisely, this concept is a refinement of both CEucl...
Definition: CInteger.h:88
Aim: This concept describes an unbounded cellular grid space in nD. In these spaces obtained by carte...
BOOST_STATIC_ASSERT((ConceptUtils::SameType< Integer, typename Space::Integer >::value))
BOOST_CONCEPT_ASSERT((CConstSinglePassRange< Cells >))
BOOST_CONCEPT_ASSERT((boost::UniqueAssociativeContainer< SCellMap >))
BOOST_STATIC_ASSERT((ConceptUtils::SameType< Point, typename Space::Point >::value))
T::template CellMap< Dummy >::Type CellMap
BOOST_CONCEPT_ASSERT((CInteger< Integer >))
BOOST_CONCEPT_ASSERT((boost::UniqueAssociativeContainer< CellSet >))
BOOST_CONCEPT_ASSERT((boost::PairAssociativeContainer< SCellMap >))
T::template SurfelMap< Dummy >::Type SurfelMap
BOOST_CONCEPT_ASSERT((boost::UniqueAssociativeContainer< CellMap >))
BOOST_CONCEPT_ASSERT((boost::SimpleAssociativeContainer< SCellSet >))
BOOST_STATIC_ASSERT((ConceptUtils::SameType< Vector, typename Space::Vector >::value))
BOOST_CONCEPT_ASSERT((CConstSinglePassRange< SCells >))
BOOST_CONCEPT_ASSERT((boost::PairAssociativeContainer< SurfelMap >))
T::template SCellMap< Dummy >::Type SCellMap
BOOST_CONCEPT_ASSERT((boost::UniqueAssociativeContainer< SCellSet >))
BOOST_CONCEPT_ASSERT((boost::SimpleAssociativeContainer< SurfelSet >))
BOOST_CONCEPT_ASSERT((boost::UniqueAssociativeContainer< SurfelMap >))
BOOST_CONCEPT_ASSERT((boost::SimpleAssociativeContainer< CellSet >))
BOOST_CONCEPT_ASSERT((boost::UniqueAssociativeContainer< SurfelSet >))
BOOST_CONCEPT_ASSERT((boost::PairAssociativeContainer< CellMap >))
Go to http://www.sgi.com/tech/stl/CopyConstructible.html.
Definition: Boost.dox:34
Go to http://www.sgi.com/tech/stl/DefaultConstructible.html.
Definition: Boost.dox:30
Go to http://www.sgi.com/tech/stl/PairAssociativeContainer.html.
Definition: Boost.dox:149
Go to http://www.sgi.com/tech/stl/SimpleAssociativeContainer.html.
Definition: Boost.dox:146
Go to http://www.sgi.com/tech/stl/UniqueAssociativeContainer.html.
Definition: Boost.dox:140