DGtal  1.0.0
CubicalComplex.h
1 
17 #pragma once
18 
31 #if defined(CubicalComplex_RECURSES)
32 #error Recursive header files inclusion detected in CubicalComplex.h
33 #else // defined(CubicalComplex_RECURSES)
34 
35 #define CubicalComplex_RECURSES
36 
37 #if !defined CubicalComplex_h
38 
39 #define CubicalComplex_h
40 
42 // Inclusions
43 #include <iostream>
44 #include <vector>
45 #include <string>
46 #include <algorithm>
47 #include <boost/type_traits.hpp>
48 #include <boost/iterator/iterator_facade.hpp>
49 #include "DGtal/base/Common.h"
50 #include "DGtal/base/ConstAlias.h"
51 #include "DGtal/base/Alias.h"
52 #include "DGtal/base/ContainerTraits.h"
53 #include "DGtal/base/CSTLAssociativeContainer.h"
54 #include "DGtal/topology/CCellularGridSpaceND.h"
56 
57 namespace DGtal
58 {
59 
76  struct CubicalCellData {
77  inline CubicalCellData() : data( 0 ) {}
78  CubicalCellData( uint32_t d ) : data( d ) {}
80  };
81 
82  // Forward definitions.
83  template < typename TKSpace, typename TCellContainer >
85 
86  template < typename TKSpace, typename TCellContainer >
90  template < typename TKSpace, typename TCellContainer >
94  template < typename TKSpace, typename TCellContainer >
98  template < typename TKSpace, typename TCellContainer >
102  template < typename TKSpace, typename TCellContainer >
106  template < typename TKSpace, typename TCellContainer >
110  template < typename TKSpace, typename TCellContainer >
114  template < typename TKSpace, typename TCellContainer >
118 
119  template < typename TKSpace, typename TCellContainer >
122  template < typename TKSpace, typename TCellContainer >
125 
126  template < typename TKSpace, typename TCellContainer >
127  bool
130  template < typename TKSpace, typename TCellContainer >
131  bool
134  template < typename TKSpace, typename TCellContainer >
135  bool
138  template < typename TKSpace, typename TCellContainer >
139  bool
142 
143 
145  // template class CubicalComplex
173  template < typename TKSpace,
174  typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type >
175  class CubicalComplex
176  {
177  // ----------------------- associated types ------------------------------
178  public:
180 
183 
184  // JOL: Not used, because unordered_set and unordered_map do not pass
185  // these concept checks.
186  // BOOST_CONCEPT_ASSERT(( boost::AssociativeContainer< TCellContainer > ));
187  // BOOST_CONCEPT_ASSERT(( boost::PairAssociativeContainer< TCellContainer > ));
189 
190  friend Self& DGtal::operator|=<>( Self&, const Self& );
191  friend Self& DGtal::operator&=<>( Self&, const Self& );
192  friend Self& DGtal::operator^=<>( Self&, const Self& );
193  friend Self& DGtal::operator-=<>( Self&, const Self& );
194  friend Self DGtal::operator| <>( const Self&, const Self& );
195  friend Self DGtal::operator& <>( const Self&, const Self& );
196  friend Self DGtal::operator^ <>( const Self&, const Self& );
197  friend Self DGtal::operator- <>( const Self&, const Self& );
198  friend Self DGtal::operator~ <>( const Self& );
199  friend Self DGtal::operator* <>( const Self& );
200  friend bool DGtal::operator==<>( const Self&, const Self& );
201  friend bool DGtal::operator!=<>( const Self&, const Self& );
202  friend bool DGtal::operator<=<>( const Self&, const Self& );
203  friend bool DGtal::operator>=<>( const Self&, const Self& );
204 
205  typedef TKSpace KSpace;
206  typedef TCellContainer CellContainer;
207  typedef typename CellContainer::mapped_type Data;
208 
209  BOOST_STATIC_ASSERT (( boost::is_base_of< CubicalCellData, Data >::value ));
210  BOOST_STATIC_ASSERT (( boost::is_same< typename TKSpace::Cell, typename CellContainer::key_type >::value ));
211 
212 
215  typedef typename KSpace::Integer Integer;
216  typedef typename KSpace::Cell Cell;
217  typedef typename KSpace::Cells Cells;
218  typedef typename KSpace::Space Space;
219  typedef typename KSpace::Size Size;
220  typedef typename KSpace::Point Point;
221  typedef typename KSpace::DirIterator DirIterator;
223  typedef typename CellMap::const_iterator CellMapConstIterator;
224  typedef typename CellMap::iterator CellMapIterator;
225 
226 
228  enum CellType {
232  };
233 
235  BOOST_STATIC_CONSTANT( uint32_t, REMOVED = 0x10000000 );
237  BOOST_STATIC_CONSTANT( uint32_t, COLLAPSIBLE = 0x20000000 );
239  BOOST_STATIC_CONSTANT( uint32_t, FIXED = 0x40000000 );
241  BOOST_STATIC_CONSTANT( uint32_t, USER1 = 0x80000000 );
243  BOOST_STATIC_CONSTANT( uint32_t, VALUE = 0x0fffffff );
244 
245  // ----------------------- inner types ------------------------------------
246 
254 
264  bool operator()( const CellMapIterator& it1, const CellMapIterator& it2 ) const
265  {
266  uint32_t v1 = it1->second.data & VALUE;
267  uint32_t v2 = it2->second.data & VALUE;
268  return ( v1 < v2 )
269  || ( ( v1 == v2 ) && ( it1->first < it2->first ) );
270  }
271  };
272 
278  : public boost::iterator_facade< ConstIterator, Cell const,
279  std::forward_iterator_tag >
280  {
281  friend class CubicalComplex;
282 
283  typedef boost::iterator_facade< ConstIterator, Cell const,
284  std::forward_iterator_tag > Base;
286  typedef typename Base::value_type Value;
287  typedef typename Base::pointer Pointer;
288  typedef typename Base::reference Reference;
289  typedef typename Base::difference_type DifferenceType;
290 
292  ConstIterator() : myCC( 0 ), myD( 0 ) {}
293 
303  : myCC( &cc ), myD( d )
304  {
305  if ( myD <= myCC->dimension )
306  {
307  myIt = myCC->begin( myD );
308  myItEnd = myCC->end( myD );
309  nextDimension();
310  }
311  else
312  {
313  myD = myCC->dimension + 1;
314  myIt = myCC->end( myCC->dimension );
315  myItEnd = myCC->end( myCC->dimension );
316  }
317  }
318 
328  : myCC( &cc ), myD( d ), myIt( it )
329  {
330  ASSERT( d <= myCC->dimension );
331  myItEnd = myCC->end( d );
332  nextDimension();
333  }
334 
335  private:
337 
339  {
340  while ( myIt == myItEnd )
341  {
342  if ( ++myD > myCC->dimension ) break;
343  myIt = myCC->begin( myD );
344  myItEnd = myCC->end( myD );
345  }
346  }
347 
348  void increment()
349  {
350  ASSERT( myCC != 0 );
351  ++myIt;
352  nextDimension();
353  }
354 
355  bool equal( const ConstIterator& other ) const
356  {
357  return ( myD == other.myD ) && ( myIt == other.myIt );
358  }
359 
360  Cell const& dereference() const
361  {
362  return myIt->first;
363  }
364 
366  {
367  return myD;
368  }
369 
370  private:
375  };
376 
382  struct Iterator
383  : public boost::iterator_facade< Iterator, Cell const,
384  std::forward_iterator_tag >
385  {
386  friend class CubicalComplex;
387 
388  typedef boost::iterator_facade< Iterator, Cell const,
389  std::forward_iterator_tag > Base;
390  typedef Iterator Self;
391  typedef typename Base::value_type Value;
392  typedef typename Base::pointer Pointer;
393  typedef typename Base::reference Reference;
394  typedef typename Base::difference_type DifferenceType;
395 
397  Iterator() : myCC( 0 ), myD( 0 ) {}
398 
407  : myCC( &cc ), myD( d )
408  {
409  if ( myD <= myCC->dimension )
410  {
411  myIt = myCC->begin( myD );
412  myItEnd = myCC->end( myD );
413  nextDimension();
414  }
415  else
416  {
417  myD = myCC->dimension + 1;
418  myIt = myCC->end( myCC->dimension );
419  myItEnd = myCC->end( myCC->dimension );
420  }
421  }
422 
431  CellMapIterator it )
432  : myCC( &cc ), myD( d ), myIt( it )
433  {
434  ASSERT( d <= myCC->dimension );
435  myItEnd = myCC->end( d );
436  nextDimension();
437  }
438 
439  private:
441 
443  {
444  while ( myIt == myItEnd )
445  {
446  if ( ++myD > myCC->dimension ) break;
447  myIt = myCC->begin( myD );
448  myItEnd = myCC->end( myD );
449  }
450  }
451 
452  void increment()
453  {
454  ASSERT( myCC != 0 );
455  ++myIt;
456  nextDimension();
457  }
458 
459  bool equal( const Iterator& other ) const
460  {
461  return ( myD == other.myD ) && ( myIt == other.myIt );
462  }
463 
464  Cell const& dereference() const
465  {
466  return myIt->first;
467  }
468 
470  {
471  return myD;
472  }
473 
474  private:
479  };
480 
481  // ----------------------- STL inner types ------------------------------
482  public:
483 
484  // Renaming for STL-type of iterator.
486  typedef Iterator iterator;
487  typedef Cell value_type;
488  typedef Cell const& reference;
489  typedef Cell const& const_reference;
490  typedef typename CellContainer::size_type size_type;
491  typedef typename CellContainer::difference_type difference_type;
492  typedef Cell const* pointer;
493  typedef Cell const* const_pointer;
494 
495  // ----------------------- Standard services ------------------------------
496  public:
497 
501  ~CubicalComplex();
502 
503  protected:
509  CubicalComplex();
510  public:
511 
519 
525  CubicalComplex ( const CubicalComplex & other );
526 
532  template < typename TDigitalSet >
533  void construct ( const TDigitalSet & set );
534 
541  CubicalComplex & operator= ( const CubicalComplex & other );
542 
546  void clear();
547 
552  void clear( Dimension d );
553 
560  void fillData( Data data = Data() );
561 
570  void fillData( Dimension d, Data data = Data() );
571 
576  Dimension dim() const;
577 
582  Dimension dim( const Cell& aCell ) const;
583 
588  Size nbCells( Dimension d ) const;
589 
597  Integer euler() const;
598 
602  const KSpace& space() const;
603 
604  // ---------- cell container operations ---------------
605  public:
606 
612  const CellMap & getCells(const Dimension d) const ;
613 
619  CellMap & getCells(const Dimension d) ;
620 
623  ConstIterator begin() const;
624 
627  ConstIterator end() const;
628 
631  Iterator begin();
632 
635  Iterator end();
636 
641  Size count( const Cell& aCell ) const;
642 
644  Size size() const;
645 
648  Size max_size() const;
649 
651  bool empty() const;
652 
663  std::pair< ConstIterator, ConstIterator > equal_range( const Cell& aCell ) const;
664 
675  std::pair< Iterator, Iterator > equal_range( const Cell& aCell );
676 
681  void erase( Iterator position );
682 
688  Size erase( const Cell& aCell );
689 
695  void erase( Iterator first, Iterator last );
696 
701  ConstIterator find( const Cell& aCell ) const;
702 
707  Iterator find( const Cell& aCell );
708 
718  std::pair< Iterator, bool > insert( const Cell& aCell );
719 
727  Iterator insert( Iterator position, const Cell& aCell );
728 
736  template <class InputIterator>
737  void insert( InputIterator first, InputIterator last );
738 
746  void swap( CubicalComplex& other );
747 
748  // ---------- enhanced container operations ---------------
749  public:
750 
758  Data& operator[]( const Cell& aCell );
759 
767  bool operator()( const Cell& aCell ) const;
768 
775  void insertCell( const Cell& aCell, const Data& data = Data() );
776 
785  void insertCell( Dimension d, const Cell& aCell, const Data& data = Data() );
786 
797  template <typename CellConstIterator>
798  void insertCells( CellConstIterator it, CellConstIterator itE, const Data& data = Data() );
799 
811  template <typename CellConstIterator>
812  void insertCells( Dimension d, CellConstIterator it, CellConstIterator itE, const Data& data = Data() );
813 
818  bool belongs( const Cell& aCell ) const;
819 
825  bool belongs( Dimension d, const Cell& aCell ) const;
826 
832  Size eraseCell( const Cell& aCell );
833 
840  Size eraseCell( Dimension d, const Cell& aCell );
841 
846  void eraseCell( CellMapIterator it );
847 
854 
864  template <typename CellConstIterator>
865  Size eraseCells( CellConstIterator it, CellConstIterator itE );
866 
877  template <typename CellConstIterator>
878  Size eraseCells( Dimension d, CellConstIterator it, CellConstIterator itE );
879 
894  template <typename CellOutputIterator>
895  void faces( CellOutputIterator& outIt, const Cell& aCell,
896  bool hintClosed = false ) const;
897 
914  template <typename CellOutputIterator>
915  void directFaces( CellOutputIterator& outIt, const Cell& aCell,
916  bool hintClosed = false ) const;
917 
931  template <typename CellMapIteratorOutputIterator>
932  void directFacesIterators( CellMapIteratorOutputIterator& outIt, const Cell& aCell );
933 
949  template <typename CellOutputIterator>
950  void coFaces( CellOutputIterator& outIt, const Cell& aCell,
951  bool hintOpen = false ) const;
952 
969  template <typename CellOutputIterator>
970  void directCoFaces( CellOutputIterator& outIt, const Cell& aCell,
971  bool hintOpen = false ) const;
972 
986  template <typename CellMapIteratorOutputIterator>
987  void directCoFacesIterators( CellMapIteratorOutputIterator& outIt, const Cell& aCell );
988 
994 
1000 
1006 
1012 
1017  CellMapConstIterator findCell( const Cell& aCell ) const;
1018 
1024  CellMapConstIterator findCell( Dimension d, const Cell& aCell ) const;
1025 
1030  CellMapIterator findCell( const Cell& aCell );
1031 
1037  CellMapIterator findCell( Dimension d, const Cell& aCell );
1038 
1039  // ---------- local operations for extracting specific subcomplexes -------------
1040  public:
1041 
1059  Cells cellBoundary( const Cell& aCell, bool hintClosed = false ) const;
1060 
1077  Cells cellCoBoundary( const Cell& aCell, bool hintOpen = false ) const;
1078 
1079 
1080  // ---------------------- local properties --------------------------------------
1081  public:
1089  bool isCellInterior( const Cell& aCell ) const;
1090 
1098  bool isCellBoundary( const Cell& aCell ) const;
1099 
1123  CellType computeCellType( const Cell& c, CellMapIterator& it_cell_up,
1124  Dimension n = dimension );
1125 
1126 
1127  // ----------------------- Standard subcomplexes --------------------------------
1128  public:
1129 
1134  CubicalComplex interior() const;
1135 
1147  CubicalComplex boundary( bool hintClosed = false ) const;
1148 
1162  CubicalComplex& bdcc,
1163  bool hintClosed = false ) const;
1164 
1175  CubicalComplex closure( const CubicalComplex& S, bool hintClosed = false ) const;
1176 
1187  CubicalComplex star( const CubicalComplex& S, bool hintOpen = false ) const;
1188 
1203  CubicalComplex link( const CubicalComplex& S, bool hintClosed = false, bool hintOpen = false ) const;
1204 
1205  // ----------------------- global operations on complexes -----------------------
1206  public:
1207 
1211  void close();
1212 
1217  void close( Dimension k );
1218 
1222  void open();
1223 
1228  void open( Dimension k );
1229 
1230 
1231  // ----------------------- Interface --------------------------------------
1232  public:
1233 
1238  void selfDisplay ( std::ostream & out ) const;
1239 
1244  bool isValid() const;
1245 
1246  // --------------- CDrawableWithBoard2D realization ------------------
1247  public:
1251  std::string className() const;
1252 
1253  // ------------------------- Protected Datas ------------------------------
1254  protected:
1255 
1258 
1262  std::vector<CellMap> myCells;
1263 
1264 
1265  // ------------------------- Hidden services ------------------------------
1266  protected:
1267 
1268 
1269  private:
1270 
1271 
1272  // ------------------------- Internals ------------------------------------
1273  private:
1274 
1275 
1276  }; // end of class CubicalComplex
1277 
1283  template < typename TKSpace,
1284  typename TCellContainer >
1285  struct ContainerTraits< CubicalComplex< TKSpace, TCellContainer > >
1286  {
1287  //typedef typename ContainerTraits< TCellContainer >::Category Category;
1289  };
1290 
1291 
1298  template <typename TKSpace, typename TCellContainer>
1299  std::ostream&
1300  operator<< ( std::ostream & out,
1301  const CubicalComplex<TKSpace, TCellContainer> & object );
1302 
1303 } // namespace DGtal
1304 
1305 
1307 // Includes inline functions.
1308 #include "DGtal/topology/CubicalComplex.ih"
1309 
1310 // //
1312 
1313 #endif // !defined CubicalComplex_h
1314 
1315 #undef CubicalComplex_RECURSES
1316 #endif // else defined(CubicalComplex_RECURSES)
bool equal(const Iterator &other) const
Cell const & const_reference
Integer euler() const
void erase(Iterator position)
CellMap::iterator CellMapIterator
Iterator for visiting type CellMap.
bool operator()(const CellMapIterator &it1, const CellMapIterator &it2) const
boost::uint32_t uint32_t
unsigned 32-bit integer.
Definition: BasicTypes.h:63
std::string className() const
CellContainer::difference_type difference_type
Cells cellCoBoundary(const Cell &aCell, bool hintOpen=false) const
ConstIterator begin() const
void eraseCells(CellMapIterator it, CellMapIterator itE)
BOOST_STATIC_ASSERT(IsPairAssociativeContainer< TCellContainer >::value)
KSpace::Integer Integer
Type for integers in the space.
MyDigitalSurface::ConstIterator ConstIterator
BOOST_STATIC_CONSTANT(uint32_t, REMOVED=0x10000000)
Flag Used to indicate in a cell data that this cell has been (virtually) removed.
void directFacesIterators(CellMapIteratorOutputIterator &outIt, const Cell &aCell)
CubicalComplex star(const CubicalComplex &S, bool hintOpen=false) const
CubicalComplex closure(const CubicalComplex &S, bool hintClosed=false) const
ConstIterator(ConstAlias< CubicalComplex > cc, Dimension d)
void coFaces(CellOutputIterator &outIt, const Cell &aCell, bool hintOpen=false) const
Aim: This class encapsulates its parameter class so that to indicate to the user that the object/poin...
Definition: ConstAlias.h:186
CellContainer::mapped_type Data
Type of data associated to each cell.
const CellMap & getCells(const Dimension d) const
CubicalComplex< TKSpace, TCellContainer > operator^(const CubicalComplex< TKSpace, TCellContainer > &, const CubicalComplex< TKSpace, TCellContainer > &)
DGtal::uint32_t Dimension
Definition: Common.h:127
const KSpace * myKSpace
The Khalimsky space in which lives the cubical complex.
Cells cellBoundary(const Cell &aCell, bool hintClosed=false) const
CubicalCellData(uint32_t d)
boost::iterator_facade< ConstIterator, Cell const, std::forward_iterator_tag > Base
void faces(CellOutputIterator &outIt, const Cell &aCell, bool hintClosed=false) const
Cell const & dereference() const
void getInteriorAndBoundary(CubicalComplex &intcc, CubicalComplex &bdcc, bool hintClosed=false) const
void construct(const TDigitalSet &set)
TKSpace KSpace
Type of the cellular grid space.
void swap(CubicalComplex &other)
Aim: This class encapsulates its parameter class so that to indicate to the user that the object/poin...
Definition: Alias.h:182
bool isCellInterior(const Cell &aCell) const
std::pair< Iterator, bool > insert(const Cell &aCell)
std::pair< ConstIterator, ConstIterator > equal_range(const Cell &aCell) const
CellMap::const_iterator CellMapConstIterator
Const iterator for visiting type CellMap.
CubicalComplex< TKSpace, TCellContainer > & operator&=(CubicalComplex< TKSpace, TCellContainer > &, const CubicalComplex< TKSpace, TCellContainer > &)
NumberTraits< Integer >::UnsignedVersion Size
Type used to represent sizes in the digital space.
CubicalComplex & operator=(const CubicalComplex &other)
Size count(const Cell &aCell) const
bool operator==(PointVector< ptDim, LeftEuclideanRing, LeftContainer > const &lhs, PointVector< ptDim, RightEuclideanRing, RightContainer > const &rhs)
Equality operator between two Points/Vectors.
CubicalComplex interior() const
KSpace::Cell Cell
Type for a cell in the space.
CubicalComplex< TKSpace, TCellContainer > operator~(const CubicalComplex< TKSpace, TCellContainer > &)
KForm< Calculus, order, duality > operator-(const KForm< Calculus, order, duality > &form_a, const KForm< Calculus, order, duality > &form_b)
CubicalComplex link(const CubicalComplex &S, bool hintClosed=false, bool hintOpen=false) const
bool operator>=(PointVector< ptDim, LeftEuclideanRing, LeftContainer > const &lhs, PointVector< ptDim, RightEuclideanRing, RightContainer > const &rhs)
Comparison operator on Points/Vectors (GreaterOrEqualThan).
CellContainer::size_type size_type
CubicalComplex< TKSpace, TCellContainer > Self
void insertCell(const Cell &aCell, const Data &data=Data())
bool equal(const ConstIterator &other) const
ConstIterator find(const Cell &aCell) const
Iterator()
Default iterator. Invalid.
TCellContainer CellContainer
Type for storing cells, an associative container Cell -> Data.
bool belongs(const Cell &aCell) const
bool isValid() const
CubicalComplex< TKSpace, TCellContainer > & operator|=(CubicalComplex< TKSpace, TCellContainer > &, const CubicalComplex< TKSpace, TCellContainer > &)
CubicalComplex< TKSpace, TCellContainer > operator|(const CubicalComplex< TKSpace, TCellContainer > &, const CubicalComplex< TKSpace, TCellContainer > &)
const KSpace & space() const
std::ostream & operator<<(std::ostream &out, const ClosedIntegerHalfPlane< TSpace > &object)
void selfDisplay(std::ostream &out) const
void directCoFacesIterators(CellMapIteratorOutputIterator &outIt, const Cell &aCell)
ConstIterator()
Default iterator. Invalid.
ConstIterator const_iterator
CubicalComplex< TKSpace, TCellContainer > operator &(const CubicalComplex< TKSpace, TCellContainer > &, const CubicalComplex< TKSpace, TCellContainer > &)
Base::difference_type DifferenceType
Aim: This class represents an arbitrary cubical complex living in some Khalimsky space....
Iterator(Alias< CubicalComplex > cc, Dimension d)
bool operator!=(PointVector< ptDim, LeftEuclideanRing, LeftContainer > const &lhs, PointVector< ptDim, RightEuclideanRing, RightContainer > const &rhs)
Difference operator on Points/Vectors.
KSpace::DirIterator DirIterator
Type for iterating over cell directions.
void directCoFaces(CellOutputIterator &outIt, const Cell &aCell, bool hintOpen=false) const
Size eraseCell(const Cell &aCell)
DGtal is the top-level namespace which contains all DGtal functions and types.
CubicalComplex boundary(bool hintClosed=false) const
void insertCells(CellConstIterator it, CellConstIterator itE, const Data &data=Data())
Dimension dim() const
void fillData(Data data=Data())
friend class boost::iterator_core_access
Aim: Defines the concept describing an Associative Container of the STL (https://www....
Iterator(Alias< CubicalComplex > cc, Dimension d, CellMapIterator it)
KSpace::Point Point
Type for a point in the digital space.
KForm< Calculus, order, duality > operator *(const typename Calculus::Scalar &scalar, const KForm< Calculus, order, duality > &form)
ConstIterator(ConstAlias< CubicalComplex > cc, Dimension d, CellMapConstIterator it)
std::vector< CellMap > myCells
Base::difference_type DifferenceType
CubicalComplex< TKSpace, TCellContainer > & operator^=(CubicalComplex< TKSpace, TCellContainer > &, const CubicalComplex< TKSpace, TCellContainer > &)
CellType computeCellType(const Cell &c, CellMapIterator &it_cell_up, Dimension n=dimension)
ConstIterator end() const
Size max_size() const
BOOST_CONCEPT_ASSERT((concepts::CCellularGridSpaceND< TKSpace >))
Aim: This concept describes a cellular grid space in nD. In these spaces obtained by cartesian produc...
Size nbCells(Dimension d) const
KSpace::Cells Cells
Type for a sequence of cells in the space.
Cell const * const_pointer
CellMapConstIterator findCell(const Cell &aCell) const
KSpace::Size Size
Type for a number of elements.
Data & operator[](const Cell &aCell)
typename PreCellularGridSpace::DirIterator DirIterator
friend class boost::iterator_core_access
void directFaces(CellOutputIterator &outIt, const Cell &aCell, bool hintClosed=false) const
static const constexpr Dimension dimension
CellContainer CellMap
Type for storing cells, an associative container Cell -> Data.
CubicalComplex< TKSpace, TCellContainer > & operator-=(CubicalComplex< TKSpace, TCellContainer > &, const CubicalComplex< TKSpace, TCellContainer > &)
boost::iterator_facade< Iterator, Cell const, std::forward_iterator_tag > Base
bool operator<=(PointVector< ptDim, LeftEuclideanRing, LeftContainer > const &lhs, PointVector< ptDim, RightEuclideanRing, RightContainer > const &rhs)
Comparison operator on Points/Vectors (LesserOrEqualThan).
bool operator()(const Cell &aCell) const
Defines default container traits for arbitrary types.
AnyCellCollection< Cell > Cells
bool isCellBoundary(const Cell &aCell) const
static const Dimension dimension
The dimension of the embedding space.
TInteger Integer
Arithmetic ring induced by (+,-,*) and Integer numbers.
KSpace::Space Space
Type of the digital space.