31#if defined(CubicalComplexFunctions_RECURSES)
32#error Recursive header files inclusion detected in CubicalComplexFunctions.h
35#define CubicalComplexFunctions_RECURSES
37#if !defined CubicalComplexFunctions_h
39#define CubicalComplexFunctions_h
44#include "DGtal/base/Common.h"
45#include "DGtal/topology/CubicalComplex.h"
46#include <DGtal/topology/helpers/NeighborhoodConfigurationsHelper.h>
59 template <
typename TKSpace,
typename TCellContainer>
60 inline CubicalComplex< TKSpace, TCellContainer >
76 template <
typename TKSpace,
typename TCellContainer>
77 inline CubicalComplex< TKSpace, TCellContainer >
95 template <
typename TKSpace,
typename TCellContainer>
96 inline CubicalComplex< TKSpace, TCellContainer >&
116 template <
typename TKSpace,
typename TCellContainer>
117 inline CubicalComplex< TKSpace, TCellContainer >
124 functions::setops::operator-=( S.myCells[ i ],S2.
myCells[ i ] );
137 template <
typename TKSpace,
typename TCellContainer>
138 inline CubicalComplex< TKSpace, TCellContainer >
145 functions::setops::operator|=( S.myCells[ i ],S2.
myCells[ i ] );
158 template <
typename TKSpace,
typename TCellContainer>
159 inline CubicalComplex< TKSpace, TCellContainer >&
165 functions::setops::operator|=( S1.
myCells[ i ], S2.
myCells[ i ] );
178 template <
typename TKSpace,
typename TCellContainer>
179 inline CubicalComplex< TKSpace, TCellContainer >
186 functions::setops::operator&=( S.myCells[ i ], S2.
myCells[ i ] );
199 template <
typename TKSpace,
typename TCellContainer>
200 inline CubicalComplex< TKSpace, TCellContainer >&
206 functions::setops::operator&=( S1.
myCells[ i ], S2.
myCells[ i ] );
220 template <
typename TKSpace,
typename TCellContainer>
221 inline CubicalComplex< TKSpace, TCellContainer >
228 functions::setops::operator^=( S.myCells[ i ], S2.
myCells[ i ] );
243 template <
typename TKSpace,
typename TCellContainer>
244 inline CubicalComplex< TKSpace, TCellContainer >&
250 functions::setops::operator^=( S1.
myCells[ i ], S2.
myCells[ i ] );
264 template <
typename TKSpace,
typename TCellContainer>
291 template <
typename TKSpace,
typename TCellContainer>
315 template <
typename TKSpace,
typename TCellContainer>
338 template <
typename TKSpace,
typename TCellContainer>
351 namespace functions {
392 template <
typename TKSpace,
typename TCellContainer,
393 typename CellConstIterator,
394 typename CellMapIteratorPriority >
396 CellConstIterator S_itB, CellConstIterator S_itE,
397 const CellMapIteratorPriority& priority,
398 bool hintIsSClosed =
false,
bool hintIsKClosed =
false,
399 bool verbose =
false );
431 template <
typename TKSpace,
typename TCellContainer,
432 typename BdryCellOutputIterator,
433 typename InnerCellOutputIterator>
436 const typename TKSpace::Point& kLow,
437 const typename TKSpace::Point& kUp,
438 BdryCellOutputIterator itBdry,
439 InnerCellOutputIterator itInner );
457 template <
typename TObject,
typename TKSpace,
typename TCellContainer>
458 std::unique_ptr<TObject>
482 template<
typename TComplex>
485 const TComplex & input_complex,
486 const typename TComplex::Point & center,
487 const std::unordered_map<
496#include "DGtal/topology/CubicalComplexFunctions.ih"
503#undef CubicalComplexFunctions_RECURSES
Aim: This class represents an arbitrary cubical complex living in some Khalimsky space....
const KSpace & space() const
std::vector< CellMap > myCells
static const Dimension dimension
The dimension of the embedding space.
NeighborhoodConfiguration getSpelNeighborhoodConfigurationOccupancy(const TComplex &input_complex, const typename TComplex::Point ¢er, const std::unordered_map< typename TComplex::Point, NeighborhoodConfiguration > &mapPointToMask)
uint64_t collapse(CubicalComplex< TKSpace, TCellContainer > &K, CellConstIterator S_itB, CellConstIterator S_itE, const CellMapIteratorPriority &priority, bool hintIsSClosed=false, bool hintIsKClosed=false, bool verbose=false)
void filterCellsWithinBounds(const CubicalComplex< TKSpace, TCellContainer > &K, const typename TKSpace::Point &kLow, const typename TKSpace::Point &kUp, BdryCellOutputIterator itBdry, InnerCellOutputIterator itInner)
bool isEqual(const Container &S1, const Container &S2)
std::unique_ptr< TObject > objectFromSpels(const CubicalComplex< TKSpace, TCellContainer > &C)
bool isSubset(const Container &S1, const Container &S2)
DGtal is the top-level namespace which contains all DGtal functions and types.
bool operator>=(PointVector< ptDim, LeftEuclideanRing, LeftContainer > const &lhs, PointVector< ptDim, RightEuclideanRing, RightContainer > const &rhs)
Comparison operator on Points/Vectors (GreaterOrEqualThan).
KForm< Calculus, order, duality > operator*(const typename Calculus::Scalar &scalar, const KForm< Calculus, order, duality > &form)
CubicalComplex< TKSpace, TCellContainer > & operator^=(CubicalComplex< TKSpace, TCellContainer > &, const CubicalComplex< TKSpace, TCellContainer > &)
bool operator==(PointVector< ptDim, LeftEuclideanRing, LeftContainer > const &lhs, PointVector< ptDim, RightEuclideanRing, RightContainer > const &rhs)
Equality operator between two Points/Vectors.
CubicalComplex< TKSpace, TCellContainer > & operator&=(CubicalComplex< TKSpace, TCellContainer > &, const CubicalComplex< TKSpace, TCellContainer > &)
bool operator!=(PointVector< ptDim, LeftEuclideanRing, LeftContainer > const &lhs, PointVector< ptDim, RightEuclideanRing, RightContainer > const &rhs)
Difference operator on Points/Vectors.
CubicalComplex< TKSpace, TCellContainer > operator~(const CubicalComplex< TKSpace, TCellContainer > &)
bool operator<=(PointVector< ptDim, LeftEuclideanRing, LeftContainer > const &lhs, PointVector< ptDim, RightEuclideanRing, RightContainer > const &rhs)
Comparison operator on Points/Vectors (LesserOrEqualThan).
DGtal::uint32_t Dimension
CubicalComplex< TKSpace, TCellContainer > operator^(const CubicalComplex< TKSpace, TCellContainer > &, const CubicalComplex< TKSpace, TCellContainer > &)
uint32_t NeighborhoodConfiguration
boost::uint64_t uint64_t
unsigned 64-bit integer.
CubicalComplex< TKSpace, TCellContainer > & operator|=(CubicalComplex< TKSpace, TCellContainer > &, const CubicalComplex< TKSpace, TCellContainer > &)
KForm< Calculus, order, duality > operator-(const KForm< Calculus, order, duality > &form_a, const KForm< Calculus, order, duality > &form_b)
CubicalComplex< TKSpace, TCellContainer > operator&(const CubicalComplex< TKSpace, TCellContainer > &, const CubicalComplex< TKSpace, TCellContainer > &)
CubicalComplex< TKSpace, TCellContainer > operator|(const CubicalComplex< TKSpace, TCellContainer > &, const CubicalComplex< TKSpace, TCellContainer > &)
CubicalComplex< TKSpace, TCellContainer > & operator-=(CubicalComplex< TKSpace, TCellContainer > &, const CubicalComplex< TKSpace, TCellContainer > &)
CubicalComplex< KSpace, Map > CC