DGtal  0.9.2
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  namespace functions {
87  template < typename TKSpace, typename TCellContainer >
91  template < typename TKSpace, typename TCellContainer >
95  template < typename TKSpace, typename TCellContainer >
99  template < typename TKSpace, typename TCellContainer >
103  template < typename TKSpace, typename TCellContainer >
107  template < typename TKSpace, typename TCellContainer >
111  template < typename TKSpace, typename TCellContainer >
115  template < typename TKSpace, typename TCellContainer >
119 
120  template < typename TKSpace, typename TCellContainer >
123  template < typename TKSpace, typename TCellContainer >
126 
127  template < typename TKSpace, typename TCellContainer >
128  bool
131  template < typename TKSpace, typename TCellContainer >
132  bool
135  template < typename TKSpace, typename TCellContainer >
136  bool
137  operator<=( const CubicalComplex< TKSpace, TCellContainer >&,
139  template < typename TKSpace, typename TCellContainer >
140  bool
143  } // namespace functions
144 
145 
147  // template class CubicalComplex
175  template < typename TKSpace,
176  typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type >
177  class CubicalComplex
178  {
179  // ----------------------- associated types ------------------------------
180  public:
182 
185 
186  // JOL: Not used, because unordered_set and unordered_map do not pass
187  // these concept checks.
188  // BOOST_CONCEPT_ASSERT(( boost::AssociativeContainer< TCellContainer > ));
189  // BOOST_CONCEPT_ASSERT(( boost::PairAssociativeContainer< TCellContainer > ));
191 
192  friend Self& DGtal::functions::operator|=<>( Self&, const Self& );
193  friend Self& DGtal::functions::operator&=<>( Self&, const Self& );
194  friend Self& DGtal::functions::operator^=<>( Self&, const Self& );
195  friend Self& DGtal::functions::operator-=<>( Self&, const Self& );
196  friend Self DGtal::functions::operator| <>( const Self&, const Self& );
197  friend Self DGtal::functions::operator& <>( const Self&, const Self& );
198  friend Self DGtal::functions::operator^ <>( const Self&, const Self& );
199  friend Self DGtal::functions::operator- <>( const Self&, const Self& );
200  friend Self DGtal::functions::operator~ <>( const Self& );
201  friend Self DGtal::functions::operator* <>( const Self& );
202  friend bool DGtal::functions::operator==<>( const Self&, const Self& );
203  friend bool DGtal::functions::operator!=<>( const Self&, const Self& );
204  friend bool DGtal::functions::operator<=<>( const Self&, const Self& );
205  friend bool DGtal::functions::operator>=<>( const Self&, const Self& );
206 
207  typedef TKSpace KSpace;
208  typedef TCellContainer CellContainer;
209  typedef typename CellContainer::mapped_type Data;
210 
211  BOOST_STATIC_ASSERT (( boost::is_base_of< CubicalCellData, Data >::value ));
212  BOOST_STATIC_ASSERT (( boost::is_same< typename TKSpace::Cell, typename CellContainer::key_type >::value ));
213 
214 
216  static const Dimension dimension = KSpace::dimension;
217  typedef typename KSpace::Integer Integer;
218  typedef typename KSpace::Cell Cell;
219  typedef typename KSpace::Cells Cells;
220  typedef typename KSpace::Space Space;
221  typedef typename KSpace::Size Size;
222  typedef typename KSpace::Point Point;
223  typedef typename KSpace::DirIterator DirIterator;
224  typedef CellContainer CellMap;
225  typedef typename CellMap::const_iterator CellMapConstIterator;
226  typedef typename CellMap::iterator CellMapIterator;
227 
228 
230  enum CellType {
234  };
235 
237  BOOST_STATIC_CONSTANT( uint32_t, REMOVED = 0x10000000 );
239  BOOST_STATIC_CONSTANT( uint32_t, COLLAPSIBLE = 0x20000000 );
241  BOOST_STATIC_CONSTANT( uint32_t, FIXED = 0x40000000 );
243  BOOST_STATIC_CONSTANT( uint32_t, USER1 = 0x80000000 );
245  BOOST_STATIC_CONSTANT( uint32_t, VALUE = 0x0fffffff );
246 
247  // ----------------------- inner types ------------------------------------
248 
256 
266  bool operator()( const CellMapIterator& it1, const CellMapIterator& it2 ) const
267  {
268  uint32_t v1 = it1->second.data & VALUE;
269  uint32_t v2 = it2->second.data & VALUE;
270  return ( v1 < v2 )
271  || ( ( v1 == v2 ) && ( it1->first < it2->first ) );
272  }
273  };
274 
280  : public boost::iterator_facade< ConstIterator, Cell const,
281  std::forward_iterator_tag >
282  {
283  friend class CubicalComplex;
284 
285  typedef boost::iterator_facade< ConstIterator, Cell const,
286  std::forward_iterator_tag > Base;
287  typedef ConstIterator Self;
288  typedef typename Base::value_type Value;
289  typedef typename Base::pointer Pointer;
290  typedef typename Base::reference Reference;
291  typedef typename Base::difference_type DifferenceType;
292 
294  ConstIterator() : myCC( 0 ), myD( 0 ) {}
295 
305  : myCC( &cc ), myD( d )
306  {
307  if ( myD <= myCC->dimension )
308  {
309  myIt = myCC->begin( myD );
310  myItEnd = myCC->end( myD );
311  nextDimension();
312  }
313  else
314  {
315  myD = myCC->dimension + 1;
316  myIt = myCC->end( myCC->dimension );
317  myItEnd = myCC->end( myCC->dimension );
318  }
319  }
320 
329  CellMapConstIterator it )
330  : myCC( &cc ), myD( d ), myIt( it )
331  {
332  ASSERT( d <= myCC->dimension );
333  myItEnd = myCC->end( d );
334  nextDimension();
335  }
336 
337  private:
339 
341  {
342  while ( myIt == myItEnd )
343  {
344  if ( ++myD > myCC->dimension ) break;
345  myIt = myCC->begin( myD );
346  myItEnd = myCC->end( myD );
347  }
348  }
349 
350  void increment()
351  {
352  ASSERT( myCC != 0 );
353  ++myIt;
354  nextDimension();
355  }
356 
357  bool equal( const ConstIterator& other ) const
358  {
359  return ( myD == other.myD ) && ( myIt == other.myIt );
360  }
361 
362  Cell const& dereference() const
363  {
364  return myIt->first;
365  }
366 
368  {
369  return myD;
370  }
371 
372  private:
375  CellMapConstIterator myIt;
376  CellMapConstIterator myItEnd;
377  };
378 
384  struct Iterator
385  : public boost::iterator_facade< Iterator, Cell const,
386  std::forward_iterator_tag >
387  {
388  friend class CubicalComplex;
389 
390  typedef boost::iterator_facade< Iterator, Cell const,
391  std::forward_iterator_tag > Base;
392  typedef Iterator Self;
393  typedef typename Base::value_type Value;
394  typedef typename Base::pointer Pointer;
395  typedef typename Base::reference Reference;
396  typedef typename Base::difference_type DifferenceType;
397 
399  Iterator() : myCC( 0 ), myD( 0 ) {}
400 
409  : myCC( &cc ), myD( d )
410  {
411  if ( myD <= myCC->dimension )
412  {
413  myIt = myCC->begin( myD );
414  myItEnd = myCC->end( myD );
415  nextDimension();
416  }
417  else
418  {
419  myD = myCC->dimension + 1;
420  myIt = myCC->end( myCC->dimension );
421  myItEnd = myCC->end( myCC->dimension );
422  }
423  }
424 
433  CellMapIterator it )
434  : myCC( &cc ), myD( d ), myIt( it )
435  {
436  ASSERT( d <= myCC->dimension );
437  myItEnd = myCC->end( d );
438  nextDimension();
439  }
440 
441  private:
443 
445  {
446  while ( myIt == myItEnd )
447  {
448  if ( ++myD > myCC->dimension ) break;
449  myIt = myCC->begin( myD );
450  myItEnd = myCC->end( myD );
451  }
452  }
453 
454  void increment()
455  {
456  ASSERT( myCC != 0 );
457  ++myIt;
458  nextDimension();
459  }
460 
461  bool equal( const Iterator& other ) const
462  {
463  return ( myD == other.myD ) && ( myIt == other.myIt );
464  }
465 
466  Cell const& dereference() const
467  {
468  return myIt->first;
469  }
470 
472  {
473  return myD;
474  }
475 
476  private:
479  CellMapIterator myIt;
480  CellMapIterator myItEnd;
481  };
482 
483  // ----------------------- STL inner types ------------------------------
484  public:
485 
486  // Renaming for STL-type of iterator.
489  typedef Cell value_type;
490  typedef Cell const& reference;
491  typedef Cell const& const_reference;
492  typedef typename CellContainer::size_type size_type;
493  typedef typename CellContainer::difference_type difference_type;
494  typedef Cell const* pointer;
495  typedef Cell const* const_pointer;
496 
497  // ----------------------- Standard services ------------------------------
498  public:
499 
503  ~CubicalComplex();
504 
505  protected:
511  CubicalComplex();
512  public:
513 
521 
527  CubicalComplex ( const CubicalComplex & other );
528 
534  template < typename TDigitalSet >
535  void construct ( const TDigitalSet & set );
536 
543  CubicalComplex & operator= ( const CubicalComplex & other );
544 
548  void clear();
549 
554  void clear( Dimension d );
555 
562  void fillData( Data data = Data() );
563 
572  void fillData( Dimension d, Data data = Data() );
573 
578  Dimension dim() const;
579 
584  Dimension dim( const Cell& aCell ) const;
585 
590  Size nbCells( Dimension d ) const;
591 
599  Integer euler() const;
600 
604  const KSpace& space() const;
605 
606  // ---------- cell container operations ---------------
607  public:
608 
611  ConstIterator begin() const;
612 
615  ConstIterator end() const;
616 
619  Iterator begin();
620 
623  Iterator end();
624 
629  Size count( const Cell& aCell ) const;
630 
632  Size size() const;
633 
636  Size max_size() const;
637 
639  bool empty() const;
640 
651  std::pair< ConstIterator, ConstIterator > equal_range( const Cell& aCell ) const;
652 
663  std::pair< Iterator, Iterator > equal_range( const Cell& aCell );
664 
669  void erase( Iterator position );
670 
676  Size erase( const Cell& aCell );
677 
683  void erase( Iterator first, Iterator last );
684 
689  ConstIterator find( const Cell& aCell ) const;
690 
695  Iterator find( const Cell& aCell );
696 
706  std::pair< Iterator, bool > insert( const Cell& aCell );
707 
715  Iterator insert( Iterator position, const Cell& aCell );
716 
724  template <class InputIterator>
725  void insert( InputIterator first, InputIterator last );
726 
734  void swap( CubicalComplex& other );
735 
736  // ---------- enhanced container operations ---------------
737  public:
738 
746  Data& operator[]( const Cell& aCell );
747 
755  bool operator()( const Cell& aCell ) const;
756 
763  void insertCell( const Cell& aCell, const Data& data = Data() );
764 
773  void insertCell( Dimension d, const Cell& aCell, const Data& data = Data() );
774 
785  template <typename CellConstIterator>
786  void insertCells( CellConstIterator it, CellConstIterator itE, const Data& data = Data() );
787 
799  template <typename CellConstIterator>
800  void insertCells( Dimension d, CellConstIterator it, CellConstIterator itE, const Data& data = Data() );
801 
806  bool belongs( const Cell& aCell ) const;
807 
813  bool belongs( Dimension d, const Cell& aCell ) const;
814 
820  Size eraseCell( const Cell& aCell );
821 
828  Size eraseCell( Dimension d, const Cell& aCell );
829 
834  void eraseCell( CellMapIterator it );
835 
841  void eraseCells( CellMapIterator it, CellMapIterator itE );
842 
852  template <typename CellConstIterator>
853  Size eraseCells( CellConstIterator it, CellConstIterator itE );
854 
865  template <typename CellConstIterator>
866  Size eraseCells( Dimension d, CellConstIterator it, CellConstIterator itE );
867 
882  template <typename CellOutputIterator>
883  void faces( CellOutputIterator& outIt, const Cell& aCell,
884  bool hintClosed = false ) const;
885 
902  template <typename CellOutputIterator>
903  void directFaces( CellOutputIterator& outIt, const Cell& aCell,
904  bool hintClosed = false ) const;
905 
919  template <typename CellMapIteratorOutputIterator>
920  void directFacesIterators( CellMapIteratorOutputIterator& outIt, const Cell& aCell );
921 
937  template <typename CellOutputIterator>
938  void coFaces( CellOutputIterator& outIt, const Cell& aCell,
939  bool hintOpen = false ) const;
940 
957  template <typename CellOutputIterator>
958  void directCoFaces( CellOutputIterator& outIt, const Cell& aCell,
959  bool hintOpen = false ) const;
960 
974  template <typename CellMapIteratorOutputIterator>
975  void directCoFacesIterators( CellMapIteratorOutputIterator& outIt, const Cell& aCell );
976 
981  CellMapConstIterator begin( Dimension d ) const;
982 
987  CellMapConstIterator end( Dimension d ) const;
988 
993  CellMapIterator begin( Dimension d );
994 
999  CellMapIterator end( Dimension d );
1000 
1005  CellMapConstIterator findCell( const Cell& aCell ) const;
1006 
1012  CellMapConstIterator findCell( Dimension d, const Cell& aCell ) const;
1013 
1018  CellMapIterator findCell( const Cell& aCell );
1019 
1025  CellMapIterator findCell( Dimension d, const Cell& aCell );
1026 
1027  // ---------- local operations for extracting specific subcomplexes -------------
1028  public:
1029 
1047  Cells cellBoundary( const Cell& aCell, bool hintClosed = false ) const;
1048 
1065  Cells cellCoBoundary( const Cell& aCell, bool hintOpen = false ) const;
1066 
1067 
1068  // ---------------------- local properties --------------------------------------
1069  public:
1077  bool isCellInterior( const Cell& aCell ) const;
1078 
1086  bool isCellBoundary( const Cell& aCell ) const;
1087 
1111  CellType computeCellType( const Cell& c, CellMapIterator& it_cell_up,
1112  Dimension n = dimension );
1113 
1114 
1115  // ----------------------- Standard subcomplexes --------------------------------
1116  public:
1117 
1122  CubicalComplex interior() const;
1123 
1135  CubicalComplex boundary( bool hintClosed = false ) const;
1136 
1149  void getInteriorAndBoundary( CubicalComplex& intcc,
1150  CubicalComplex& bdcc,
1151  bool hintClosed = false ) const;
1152 
1163  CubicalComplex closure( const CubicalComplex& S, bool hintClosed = false ) const;
1164 
1175  CubicalComplex star( const CubicalComplex& S, bool hintOpen = false ) const;
1176 
1191  CubicalComplex link( const CubicalComplex& S, bool hintClosed = false, bool hintOpen = false ) const;
1192 
1193  // ----------------------- global operations on complexes -----------------------
1194  public:
1195 
1199  void close();
1200 
1205  void close( Dimension k );
1206 
1210  void open();
1211 
1216  void open( Dimension k );
1217 
1218 
1219  // ----------------------- Interface --------------------------------------
1220  public:
1221 
1226  void selfDisplay ( std::ostream & out ) const;
1227 
1232  bool isValid() const;
1233 
1234  // --------------- CDrawableWithBoard2D realization ------------------
1235  public:
1239  std::string className() const;
1240 
1241  // ------------------------- Protected Datas ------------------------------
1242  protected:
1243 
1245  const KSpace* myKSpace;
1246 
1247  // ------------------------- Private Datas --------------------------------
1248  private:
1249 
1253  std::vector<CellMap> myCells;
1254 
1255 
1256  // ------------------------- Hidden services ------------------------------
1257  protected:
1258 
1259 
1260  private:
1261 
1262 
1263  // ------------------------- Internals ------------------------------------
1264  private:
1265 
1266 
1267  }; // end of class CubicalComplex
1268 
1274  template < typename TKSpace,
1275  typename TCellContainer >
1276  struct ContainerTraits< CubicalComplex< TKSpace, TCellContainer > >
1277  {
1278  //typedef typename ContainerTraits< TCellContainer >::Category Category;
1280  };
1281 
1282 
1289  template <typename TKSpace, typename TCellContainer>
1290  std::ostream&
1291  operator<< ( std::ostream & out,
1292  const CubicalComplex<TKSpace, TCellContainer> & object );
1293 
1294 } // namespace DGtal
1295 
1296 
1298 // Includes inline functions.
1299 #include "DGtal/topology/CubicalComplex.ih"
1300 
1301 // //
1303 
1304 #endif // !defined CubicalComplex_h
1305 
1306 #undef CubicalComplex_RECURSES
1307 #endif // else defined(CubicalComplex_RECURSES)
Cell const & const_reference
void erase(Iterator position)
CellMap::iterator CellMapIterator
Iterator for visiting type CellMap.
boost::uint32_t uint32_t
unsigned 32-bit integer.
Definition: BasicTypes.h:63
bool belongs(const Cell &aCell) const
CellContainer::difference_type difference_type
bool operator()(const Cell &aCell) const
bool empty() const
CubicalComplex link(const CubicalComplex &S, bool hintClosed=false, bool hintOpen=false) const
bool operator==(const CubicalComplex< TKSpace, TCellContainer > &, const CubicalComplex< TKSpace, TCellContainer > &)
CubicalComplex< TKSpace, TCellContainer > operator*(const CubicalComplex< TKSpace, TCellContainer > &)
std::string className() const
void eraseCells(CellMapIterator it, CellMapIterator itE)
BOOST_STATIC_ASSERT(IsPairAssociativeContainer< TCellContainer >::value)
KSpace::Integer Integer
Type for integers in the space.
ConstIterator begin() const
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)
void directFaces(CellOutputIterator &outIt, const Cell &aCell, bool hintClosed=false) const
ConstIterator(ConstAlias< CubicalComplex > cc, Dimension d)
void selfDisplay(std::ostream &out) 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.
DGtal::uint32_t Dimension
Definition: Common.h:113
CubicalComplex< TKSpace, TCellContainer > & operator-=(CubicalComplex< TKSpace, TCellContainer > &, const CubicalComplex< TKSpace, TCellContainer > &)
CubicalComplex< TKSpace, TCellContainer > operator~(const CubicalComplex< TKSpace, TCellContainer > &)
const KSpace * myKSpace
The Khalimsky space in which lives the cubical complex.
bool operator()(const CellMapIterator &it1, const CellMapIterator &it2) const
CubicalCellData(uint32_t d)
void directCoFaces(CellOutputIterator &outIt, const Cell &aCell, bool hintOpen=false) const
boost::iterator_facade< ConstIterator, Cell const, std::forward_iterator_tag > Base
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
std::pair< Iterator, bool > insert(const Cell &aCell)
CellMap::const_iterator CellMapConstIterator
Const iterator for visiting type CellMap.
bool isCellBoundary(const Cell &aCell) const
bool operator!=(const CubicalComplex< TKSpace, TCellContainer > &, const CubicalComplex< TKSpace, TCellContainer > &)
bool operator>=(const CubicalComplex< TKSpace, TCellContainer > &, const CubicalComplex< TKSpace, TCellContainer > &)
CubicalComplex & operator=(const CubicalComplex &other)
std::pair< ConstIterator, ConstIterator > equal_range(const Cell &aCell) const
ConstIterator end() const
CubicalComplex closure(const CubicalComplex &S, bool hintClosed=false) const
KSpace::Cell Cell
Type for a cell in the space.
CellType
Possible cell types within a complex.
void getInteriorAndBoundary(CubicalComplex &intcc, CubicalComplex &bdcc, bool hintClosed=false) const
CubicalComplex< TKSpace, TCellContainer > operator^(const CubicalComplex< TKSpace, TCellContainer > &, const CubicalComplex< TKSpace, TCellContainer > &)
Size count(const Cell &aCell) const
CellContainer::size_type size_type
CubicalComplex< TKSpace, TCellContainer > Self
void insertCell(const Cell &aCell, const Data &data=Data())
Iterator()
Default iterator. Invalid.
TCellContainer CellContainer
Type for storing cells, an associative container Cell -> Data.
void coFaces(CellOutputIterator &outIt, const Cell &aCell, bool hintOpen=false) const
CubicalComplex< TKSpace, TCellContainer > & operator^=(CubicalComplex< TKSpace, TCellContainer > &, const CubicalComplex< TKSpace, TCellContainer > &)
std::ostream & operator<<(std::ostream &out, const ClosedIntegerHalfPlane< TSpace > &object)
void directCoFacesIterators(CellMapIteratorOutputIterator &outIt, const Cell &aCell)
ConstIterator()
Default iterator. Invalid.
Dimension dim() const
ConstIterator const_iterator
CubicalComplex< TKSpace, TCellContainer > operator|(const CubicalComplex< TKSpace, TCellContainer > &, const CubicalComplex< TKSpace, TCellContainer > &)
CellMapConstIterator findCell(const Cell &aCell) const
Base::difference_type DifferenceType
Aim: This class represents an arbitrary cubical complex living in some Khalimsky space. Cubical complexes are sets of cells of different dimensions related together with incidence relations. Two cells in a cubical complex are incident if and only if they are incident in the surrounding Khalimsky space. In other words, cubical complexes are defined here as subsets of Khalimsky spaces.
Iterator(Alias< CubicalComplex > cc, Dimension d)
KSpace::DirIterator DirIterator
Type for iterating over cell directions.
CubicalComplex< TKSpace, TCellContainer > & operator&=(CubicalComplex< TKSpace, TCellContainer > &, const CubicalComplex< TKSpace, TCellContainer > &)
Size eraseCell(const Cell &aCell)
DGtal is the top-level namespace which contains all DGtal functions and types.
void insertCells(CellConstIterator it, CellConstIterator itE, const Data &data=Data())
void fillData(Data data=Data())
bool equal(const ConstIterator &other) const
friend class boost::iterator_core_access
Aim: Defines the concept describing an Associative Container of the STL (https://www.sgi.com/tech/stl/AssociativeContainer.html).
Cells cellCoBoundary(const Cell &aCell, bool hintOpen=false) const
Iterator(Alias< CubicalComplex > cc, Dimension d, CellMapIterator it)
KSpace::Point Point
Type for a point in the digital space.
ConstIterator(ConstAlias< CubicalComplex > cc, Dimension d, CellMapConstIterator it)
std::vector< CellMap > myCells
Base::difference_type DifferenceType
CellType computeCellType(const Cell &c, CellMapIterator &it_cell_up, Dimension n=dimension)
const KSpace & space() const
Cells cellBoundary(const Cell &aCell, bool hintClosed=false) 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
CubicalComplex boundary(bool hintClosed=false) const
CubicalComplex< TKSpace, TCellContainer > operator-(const CubicalComplex< TKSpace, TCellContainer > &, const CubicalComplex< TKSpace, TCellContainer > &)
KSpace::Cells Cells
Type for a sequence of cells in the space.
Cell const * const_pointer
Cell const & dereference() const
bool isCellInterior(const Cell &aCell) const
CubicalComplex< TKSpace, TCellContainer > & operator|=(CubicalComplex< TKSpace, TCellContainer > &, const CubicalComplex< TKSpace, TCellContainer > &)
void faces(CellOutputIterator &outIt, const Cell &aCell, bool hintClosed=false) const
KSpace::Size Size
Type for a number of elements.
Data & operator[](const Cell &aCell)
CubicalComplex star(const CubicalComplex &S, bool hintOpen=false) const
friend class boost::iterator_core_access
bool isValid() const
CellContainer CellMap
Type for storing cells, an associative container Cell -> Data.
ConstIterator find(const Cell &aCell) const
Integer euler() const
CubicalComplex< TKSpace, TCellContainer > operator&(const CubicalComplex< TKSpace, TCellContainer > &, const CubicalComplex< TKSpace, TCellContainer > &)
boost::iterator_facade< Iterator, Cell const, std::forward_iterator_tag > Base
bool equal(const Iterator &other) const
Defines default container traits for arbitrary types.
Size max_size() const
static const Dimension dimension
The dimension of the embedding space.
CubicalComplex interior() const
KSpace::Space Space
Type of the digital space.
Size size() const