DGtal  1.0.beta
KhalimskySpaceND.h
1 
17 #pragma once
18 
33 #if defined(KhalimskySpaceND_RECURSES)
34 #error Recursive header files inclusion detected in KhalimskySpaceND.h
35 #else // defined(KhalimskySpaceND_RECURSES)
36 
37 #define KhalimskySpaceND_RECURSES
38 
39 #if !defined KhalimskySpaceND_h
40 
41 #define KhalimskySpaceND_h
42 
44 // Inclusions
45 #include <iostream>
46 #include <set>
47 #include <map>
48 #include <array>
49 #include <DGtal/base/Common.h>
50 #include <DGtal/kernel/CInteger.h>
51 #include <DGtal/kernel/PointVector.h>
52 #include <DGtal/kernel/SpaceND.h>
53 #include <DGtal/topology/KhalimskyPreSpaceND.h>
55 
56 namespace DGtal
57 {
59  // Pre-declaration
60  template <
61  Dimension dim,
62  typename TInteger = DGtal::int32_t
63  >
65 
67 
70  template < class TKhalimskySpace >
72 
74 
80  template < Dimension dim,
81  typename TInteger = DGtal::int32_t >
83  {
84 
85  //Integer must be a model of the concept CInteger.
87 
88 
89  // Aliases
90  public:
91  using Integer = TInteger;
98 
99  // Friendship
100  friend class KhalimskySpaceND< dim, TInteger >;
102 
103  private:
104  // Underlying pre-cell
106 
107  private:
108 
113  explicit KhalimskyCell( const Point & aPoint );
114 
119  explicit KhalimskyCell( const PreCell & aCell );
120 
121  public:
123  operator PreCell const& () const;
124 
126  PreCell const& preCell() const;
127 
128  private:
130  explicit operator PreCell & ();
131 
132  public:
136  explicit KhalimskyCell( Integer dummy = 0 );
137 
141  KhalimskyCell( const KhalimskyCell & other ) = default;
142 
146  KhalimskyCell & operator=( const KhalimskyCell & other ) = default;
147 
151  KhalimskyCell( KhalimskyCell && other ) = default;
152 
156  KhalimskyCell & operator=( KhalimskyCell && other ) = default;
157 
162  bool operator==( const KhalimskyCell & other ) const;
163 
168  bool operator!=( const KhalimskyCell & other ) const;
169 
174  bool operator<( const KhalimskyCell & other ) const;
175 
176  // --------------- CDrawableWithBoard2D realization -------------------
177  public:
178 
183  //DrawableWithBoard2D* defaultStyle( std::string mode = "" ) const;
184 
188  std::string className() const;
189 
190  };
191 
192  template < Dimension dim,
193  typename TInteger >
194  std::ostream &
195  operator<<( std::ostream & out,
196  const KhalimskyCell< dim, TInteger > & object );
197 
198 
200 
206  template < Dimension dim,
207  typename TInteger = DGtal::int32_t >
209  {
210  //Integer must be a model of the concept CInteger.
212 
213  // Aliases
214  public:
215  using Integer = TInteger;
222 
223  // Friendship
224  friend class KhalimskySpaceND< dim, TInteger >;
226 
227  private:
228  // Underlying signed pre-cell
230 
231  private:
237  explicit SignedKhalimskyCell( const Point & aPoint, bool positive );
238 
243  explicit SignedKhalimskyCell( const SPreCell & aCell );
244 
245  public:
247  operator SPreCell const& () const;
248 
250  SPreCell const& preCell() const;
251 
252  private:
254  explicit operator SPreCell & ();
255 
256  public:
260  explicit SignedKhalimskyCell( Integer dummy = 0 );
261 
265  SignedKhalimskyCell( const SignedKhalimskyCell & other ) = default;
266 
270  SignedKhalimskyCell & operator=( const SignedKhalimskyCell & other ) = default;
271 
275  SignedKhalimskyCell( SignedKhalimskyCell && other ) = default;
276 
280  SignedKhalimskyCell & operator=( SignedKhalimskyCell && other ) = default;
281 
286  bool operator==( const SignedKhalimskyCell & other ) const;
287 
292  bool operator!=( const SignedKhalimskyCell & other ) const;
293 
298  bool operator<( const SignedKhalimskyCell & other ) const;
299 
300  // --------------- CDrawableWithBoard2D realization -------------------
301  public:
302 
307  //DrawableWithBoard2D* defaultStyle( std::string mode = "" ) const;
308 
312  std::string className() const;
313 
314  };
315 
316  template < Dimension dim,
317  typename TInteger >
318  std::ostream &
319  operator<<( std::ostream & out,
320  const SignedKhalimskyCell< dim, TInteger > & object );
321 
323  // template class KhalimskySpaceND
387  template <
388  Dimension dim,
389  typename TInteger
390  >
391  class KhalimskySpaceND
392  : private KhalimskySpaceNDHelper< KhalimskySpaceND< dim, TInteger > >
393  {
394 
396  friend class KhalimskySpaceNDHelper< KhalimskySpaceND< dim, TInteger > >;
397 
398  //Integer must be signed to characterize a ring.
400 
401  public:
403  typedef TInteger Integer;
404 
407 
408  // Spaces
412 
413  // Cells
418 
419  typedef SCell Surfel;
420  typedef bool Sign;
422 
423  // Points and Vectors
426 
427 
428  // static constants
429  static const constexpr Dimension dimension = dim;
430  static const constexpr Dimension DIM = dim;
431  static const constexpr Sign POS = true;
432  static const constexpr Sign NEG = false;
433 
434  template < typename CellType >
435  using AnyCellCollection = typename PreCellularGridSpace::template AnyCellCollection< CellType >;
436 
437  // Neighborhoods, Incident cells, Faces and Cofaces
440 
441  // Sets, Maps
443  typedef std::set<Cell> CellSet;
444 
446  typedef std::set<SCell> SCellSet;
447 
449  typedef std::set<SCell> SurfelSet;
450 
453  template <typename Value> struct CellMap {
454  typedef std::map<Cell,Value> Type;
455  };
456 
459  template <typename Value> struct SCellMap {
460  typedef std::map<SCell,Value> Type;
461  };
462 
465  template <typename Value> struct SurfelMap {
466  typedef std::map<SCell,Value> Type;
467  };
468 
470  enum Closure
471  {
475  };
476 
477  // ----------------------- Standard services ------------------------------
481  public:
482 
487 
492 
497  KhalimskySpaceND ( const KhalimskySpaceND & other ) = default;
498 
504  KhalimskySpaceND & operator= ( const KhalimskySpaceND & other ) = default;
505 
510  KhalimskySpaceND ( KhalimskySpaceND && other ) = default;
511 
517  KhalimskySpaceND & operator= ( KhalimskySpaceND && other ) = default;
518 
530  bool init( const Point & lower,
531  const Point & upper,
532  bool isClosed );
533 
546  bool init( const Point & lower,
547  const Point & upper,
548  Closure closure );
549 
562  bool init( const Point & lower,
563  const Point & upper,
564  const std::array<Closure, dim> & closure );
565 
567 
568  // ------------------------- Basic services ------------------------------
572  public:
573 
579  Size size( Dimension k ) const;
580 
586  Integer min( Dimension k ) const;
587 
593  Integer max( Dimension k ) const;
594 
599  const Point & lowerBound() const;
600 
605  const Point & upperBound() const;
606 
611  const Cell & lowerCell() const;
612 
617  const Cell & upperCell() const;
618 
629  bool uIsValid( const PreCell & c, Dimension k ) const;
630 
640  bool uIsValid( const PreCell & c ) const;
641 
652  bool sIsValid( const SPreCell & c, Dimension k ) const;
653 
663  bool sIsValid( const SPreCell & c ) const;
664 
673  bool cIsValid( const Point & p, Dimension k ) const;
674 
682  bool cIsValid( const Point & p ) const;
683 
685 
686  // ----------------------- Closure type query --------------------------
690  public:
691 
695  bool isSpaceClosed() const;
696 
701  bool isSpaceClosed( Dimension k ) const;
702 
706  bool isSpacePeriodic() const;
707 
712  bool isSpacePeriodic( Dimension k ) const;
713 
717  bool isAnyDimensionPeriodic() const;
718 
723  Closure getClosure( Dimension k ) const;
724 
726 
727  // ----------------------- Cell creation services --------------------------
731  public:
732 
747  Cell uCell( const PreCell & c ) const;
748 
762  Cell uCell( const Point & kp ) const;
763 
779  Cell uCell( Point p, const PreCell & c ) const;
780 
795  SCell sCell( const SPreCell & c ) const;
796 
811  SCell sCell( const Point & kp, Sign sign = POS ) const;
812 
828  SCell sCell( Point p, const SPreCell & c ) const;
829 
843  Cell uSpel( Point p ) const;
844 
859  SCell sSpel( Point p, Sign sign = POS ) const;
860 
874  Cell uPointel( Point p ) const;
875 
891  SCell sPointel( Point p, Sign sign = POS ) const;
892 
894 
895  // ----------------------- Read accessors to cells ------------------------
899  public:
906  Integer uKCoord( const Cell & c, Dimension k ) const;
907 
914  Integer uCoord( const Cell & c, Dimension k ) const;
915 
921  const Point & uKCoords( const Cell & c ) const;
922 
928  Point uCoords( const Cell & c ) const;
929 
936  Integer sKCoord( const SCell & c, Dimension k ) const;
937 
944  Integer sCoord( const SCell & c, Dimension k ) const;
945 
951  const Point & sKCoords( const SCell & c ) const;
952 
958  Point sCoords( const SCell & c ) const;
959 
965  Sign sSign( const SCell & c ) const;
966 
968 
969  // ----------------------- Write accessors to cells ------------------------
973  public:
974 
983  void uSetKCoord( Cell & c, Dimension k, Integer i ) const;
984 
993  void sSetKCoord( SCell & c, Dimension k, Integer i ) const;
994 
1003  void uSetCoord( Cell & c, Dimension k, Integer i ) const;
1004 
1013  void sSetCoord( SCell & c, Dimension k, Integer i ) const;
1014 
1023  void uSetKCoords( Cell & c, const Point & kp ) const;
1024 
1032  void sSetKCoords( SCell & c, const Point & kp ) const;
1033 
1041  void uSetCoords( Cell & c, const Point & kp ) const;
1042 
1050  void sSetCoords( SCell & c, const Point & kp ) const;
1051 
1056  void sSetSign( SCell & c, Sign s ) const;
1057 
1059 
1060  // -------------------- Conversion signed/unsigned ------------------------
1064  public:
1072  SCell signs( const Cell & p, Sign s ) const;
1073 
1080  Cell unsigns( const SCell & p ) const;
1081 
1089  SCell sOpp( const SCell & p ) const;
1090 
1092 
1093  // ------------------------- Cell topology services -----------------------
1097  public:
1102  Integer uTopology( const Cell & p ) const;
1103 
1108  Integer sTopology( const SCell & p ) const;
1109 
1114  Dimension uDim( const Cell & p ) const;
1115 
1120  Dimension sDim( const SCell & p ) const;
1121 
1126  bool uIsSurfel( const Cell & b ) const;
1127 
1132  bool sIsSurfel( const SCell & b ) const;
1133 
1139  bool uIsOpen( const Cell & p, Dimension k ) const;
1140 
1146  bool sIsOpen( const SCell & p, Dimension k ) const;
1147 
1149 
1150  // -------------------- Iterator services for cells ------------------------
1154  public:
1155 
1174  DirIterator uDirs( const Cell & p ) const;
1175 
1194  DirIterator sDirs( const SCell & p ) const;
1195 
1214  DirIterator uOrthDirs( const Cell & p ) const;
1215 
1234  DirIterator sOrthDirs( const SCell & p ) const;
1235 
1242  Dimension uOrthDir( const Cell & s ) const;
1243 
1250  Dimension sOrthDir( const SCell & s ) const;
1251 
1253 
1254  // -------------------- Unsigned cell geometry services --------------------
1258  public:
1259 
1265  Integer uFirst( const PreCell & p, Dimension k ) const;
1266 
1272  Cell uFirst( const PreCell & p ) const;
1273 
1279  Integer uLast( const PreCell & p, Dimension k ) const;
1280 
1286  Cell uLast( const PreCell & p ) const;
1287 
1296  Cell uGetIncr( const Cell & p, Dimension k ) const;
1297 
1307  bool uIsMax( const Cell & p, Dimension k ) const;
1308 
1309 
1317  bool uIsInside( const PreCell & p, Dimension k ) const;
1318 
1319 
1326  bool uIsInside( const PreCell & p ) const;
1327 
1335  bool cIsInside( const Point & p, Dimension k ) const;
1336 
1337 
1344  bool cIsInside( const Point & p ) const;
1345 
1355  Cell uGetMax( Cell p, Dimension k ) const;
1356 
1365  Cell uGetDecr( const Cell & p, Dimension k ) const;
1366 
1375  bool uIsMin( const Cell & p, Dimension k ) const;
1376 
1386  Cell uGetMin( Cell p, Dimension k ) const;
1387 
1388 
1398  Cell uGetAdd( const Cell & p, Dimension k, Integer x ) const;
1399 
1409  Cell uGetSub( const Cell & p, Dimension k, Integer x ) const;
1410 
1418  Integer uDistanceToMax( const Cell & p, Dimension k ) const;
1419 
1428  Integer uDistanceToMin( const Cell & p, Dimension k ) const;
1429 
1438  Cell uTranslation( const Cell & p, const Vector & vec ) const;
1439 
1450  Cell uProjection( const Cell & p, const Cell & bound, Dimension k ) const;
1451 
1461  void uProject( Cell & p, const Cell & bound, Dimension k ) const;
1462 
1484  bool uNext( Cell & p, const Cell & lower, const Cell & upper ) const;
1485 
1487 
1488  // -------------------- Signed cell geometry services --------------------
1492  public:
1493 
1499  Integer sFirst( const SPreCell & p, Dimension k ) const;
1500 
1506  SCell sFirst( const SPreCell & p ) const;
1507 
1513  Integer sLast( const SPreCell & p, Dimension k ) const;
1514 
1520  SCell sLast( const SPreCell & p ) const;
1521 
1530  SCell sGetIncr( const SCell & p, Dimension k ) const;
1531 
1540  bool sIsMax( const SCell & p, Dimension k ) const;
1541 
1548  bool sIsInside( const SPreCell & p, Dimension k ) const;
1549 
1556  bool sIsInside( const SPreCell & p ) const;
1557 
1567  SCell sGetMax( SCell p, Dimension k ) const;
1568 
1577  SCell sGetDecr( const SCell & p, Dimension k ) const;
1578 
1588  bool sIsMin( const SCell & p, Dimension k ) const;
1589 
1598  SCell sGetMin( SCell p, Dimension k ) const;
1599 
1609  SCell sGetAdd( const SCell & p, Dimension k, Integer x ) const;
1610 
1620  SCell sGetSub( const SCell & p, Dimension k, Integer x ) const;
1621 
1629  Integer sDistanceToMax( const SCell & p, Dimension k ) const;
1630 
1639  Integer sDistanceToMin( const SCell & p, Dimension k ) const;
1640 
1649  SCell sTranslation( const SCell & p, const Vector & vec ) const;
1650 
1661  SCell sProjection( const SCell & p, const SCell & bound, Dimension k ) const;
1662 
1672  void sProject( SCell & p, const SCell & bound, Dimension k ) const;
1673 
1695  bool sNext( SCell & p, const SCell & lower, const SCell & upper ) const;
1696 
1698 
1699  // ----------------------- Neighborhood services --------------------------
1703  public:
1704 
1714  Cells uNeighborhood( const Cell & cell ) const;
1715 
1725  SCells sNeighborhood( const SCell & cell ) const;
1726 
1737  Cells uProperNeighborhood( const Cell & cell ) const;
1738 
1749  SCells sProperNeighborhood( const SCell & cell ) const;
1750 
1762  Cell uAdjacent( const Cell & p, Dimension k, bool up ) const;
1763 
1775  SCell sAdjacent( const SCell & p, Dimension k, bool up ) const;
1776 
1778 
1779  // ----------------------- Incidence services --------------------------
1783  public:
1784 
1797  Cell uIncident( const Cell & c, Dimension k, bool up ) const;
1798 
1814  SCell sIncident( const SCell & c, Dimension k, bool up ) const;
1815 
1822  Cells uLowerIncident( const Cell & c ) const;
1823 
1830  Cells uUpperIncident( const Cell & c ) const;
1831 
1839  SCells sLowerIncident( const SCell & c ) const;
1840 
1848  SCells sUpperIncident( const SCell & c ) const;
1849 
1856  Cells uFaces( const Cell & c ) const;
1857 
1864  Cells uCoFaces( const Cell & c ) const;
1865 
1880  bool sDirect( const SCell & p, Dimension k ) const;
1881 
1891  SCell sDirectIncident( const SCell & p, Dimension k ) const;
1892 
1902  SCell sIndirectIncident( const SCell & p, Dimension k ) const;
1903 
1905 
1906  // ----------------------- Interface --------------------------------------
1910  public:
1911 
1916  void selfDisplay ( std::ostream & out ) const;
1917 
1922  bool isValid() const;
1923 
1925 
1926  // ------------------------- Protected Datas ------------------------------
1927  private:
1928  // ------------------------- Private Datas --------------------------------
1929  private:
1930  Point myLower;
1931  Point myUpper;
1934  std::array<Closure, dimension> myClosure;
1935 
1936  // ------------------------- Hidden services ------------------------------
1937  protected:
1938 
1939 
1940  private:
1941 
1942 
1943 
1944  // ------------------------- Internals ------------------------------------
1948  private:
1952  void uAddFaces( Cells& faces, const Cell& c, Dimension axis ) const;
1953 
1957  void uAddCoFaces( Cells& cofaces, const Cell& c, Dimension axis ) const;
1958 
1960 
1961  }; // end of class KhalimskySpaceND
1962 
1963 
1970  template < Dimension dim,
1971  typename TInteger >
1972  std::ostream&
1973  operator<< ( std::ostream & out,
1974  const KhalimskySpaceND<dim, TInteger > & object );
1975 
1976 } // namespace DGtal
1977 
1978 
1980 // Includes inline functions.
1981 #include "DGtal/topology/KhalimskySpaceND.ih"
1982 
1983 // //
1985 
1986 #endif // !defined KhalimskySpaceND_h
1987 
1988 #undef KhalimskySpaceND_RECURSES
1989 #endif // else defined(KhalimskySpaceND_RECURSES)
Sign sSign(const SCell &c) const
void uAddCoFaces(Cells &cofaces, const Cell &c, Dimension axis) const
void sSetKCoords(SCell &c, const Point &kp) const
void sSetCoords(SCell &c, const Point &kp) const
std::string className() const
SCell sPointel(Point p, Sign sign=POS) const
PointVector< dim, Integer > Vector
typename NumberTraits< Integer >::UnsignedVersion UnsignedInteger
std::set< SCell > SCellSet
Preferred type for defining a set of SCell(s).
SignedKhalimskyCell & operator=(const SignedKhalimskyCell &other)=default
Integer sLast(const SPreCell &p, Dimension k) const
bool operator!=(const KhalimskyCell &other) const
Integer uCoord(const Cell &c, Dimension k) const
KhalimskySpaceNDHelper< KhalimskySpaceND< dim, TInteger > > Helper
Features basic operations on coordinates, especially for periodic dimensions.
bool sIsInside(const SPreCell &p, Dimension k) const
BOOST_CONCEPT_ASSERT((concepts::CInteger< TInteger >))
const Point & sKCoords(const SCell &c) const
Aim: SpaceND is a utility class that defines the fundamental structure of a Digital Space in ND...
Definition: SpaceND.h:95
bool uIsOpen(const Cell &p, Dimension k) const
const Cell & lowerCell() const
Cell uGetMax(Cell p, Dimension k) const
Cell uGetDecr(const Cell &p, Dimension k) const
The dimension is open.
SCell sCell(const SPreCell &c) const
std::set< SCell > SurfelSet
Preferred type for defining a set of surfels (always signed cells).
DGtal::uint32_t Dimension
Definition: Common.h:120
Cells uNeighborhood(const Cell &cell) const
Cells uCoFaces(const Cell &c) const
Cells uLowerIncident(const Cell &c) const
PreCell const & preCell() const
Returns the underlying constant pre-cell.
DirIterator uDirs(const Cell &p) const
Cell uGetAdd(const Cell &p, Dimension k, Integer x) const
Cell uAdjacent(const Cell &p, Dimension k, bool up) const
const Cell & upperCell() const
BOOST_CONCEPT_ASSERT((concepts::CInteger< TInteger >))
KhalimskyPreSpaceND< dim, Integer > PreCellularGridSpace
std::ostream & operator<<(std::ostream &out, const ATu0v1< TKSpace, TLinearAlgebra > &object)
std::map< SCell, Value > Type
std::string className() const
bool uIsMax(const Cell &p, Dimension k) const
Dimension uDim(const Cell &p) const
Aim: This class is a model of CPreCellularGridSpaceND. It represents the cubical grid as a cell compl...
SCell sProjection(const SCell &p, const SCell &bound, Dimension k) const
SCells sLowerIncident(const SCell &c) const
The dimension is periodic.
SCell signs(const Cell &p, Sign s) const
SCell sDirectIncident(const SCell &p, Dimension k) const
void sSetSign(SCell &c, Sign s) const
std::array< Closure, dimension > myClosure
void selfDisplay(std::ostream &out) const
NumberTraits< Integer >::UnsignedVersion Size
Type used to represent sizes in the digital space.
bool isSpacePeriodic() const
void uProject(Cell &p, const Cell &bound, Dimension k) const
Integer min(Dimension k) const
Integer uDistanceToMin(const Cell &p, Dimension k) const
const Point & lowerBound() const
DirIterator uOrthDirs(const Cell &p) const
Cell uCell(const PreCell &c) const
Integer sDistanceToMax(const SCell &p, Dimension k) const
Aim: Concept checking for Integer Numbers. More precisely, this concept is a refinement of both CEucl...
Definition: CInteger.h:87
bool operator<(const SignedKhalimskyCell &other) const
Cell uGetMin(Cell p, Dimension k) const
bool sIsMin(const SCell &p, Dimension k) const
SCell sOpp(const SCell &p) const
KhalimskySpaceND< dim, Integer > CellularGridSpace
Cell uPointel(Point p) const
Integer max(Dimension k) const
bool isAnyDimensionPeriodic() const
DirIterator sDirs(const SCell &p) const
bool sIsMax(const SCell &p, Dimension k) const
static const constexpr Dimension DIM
bool uIsSurfel(const Cell &b) const
const Point & uKCoords(const Cell &c) const
Dimension sOrthDir(const SCell &s) const
Dimension uOrthDir(const Cell &s) const
void uSetCoord(Cell &c, Dimension k, Integer i) const
PreCellDirectionIterator< dim, Integer > DirIterator
void sProject(SCell &p, const SCell &bound, Dimension k) const
SCell sSpel(Point p, Sign sign=POS) const
bool init(const Point &lower, const Point &upper, bool isClosed)
KhalimskyPreCell< dim, Integer > PreCell
bool sNext(SCell &p, const SCell &lower, const SCell &upper) const
bool sIsValid(const SPreCell &c, Dimension k) const
bool uIsValid(const PreCell &c, Dimension k) const
bool operator<(const KhalimskyCell &other) const
Cell uGetSub(const Cell &p, Dimension k, Integer x) const
bool operator==(const SignedKhalimskyCell &other) const
const Point & upperBound() const
Aim: The traits class for all models of Cinteger.
Definition: NumberTraits.h:69
bool cIsValid(const Point &p, Dimension k) const
bool uIsInside(const PreCell &p, Dimension k) const
KhalimskyCell< dim, Integer > Cell
BOOST_CONCEPT_ASSERT((concepts::CInteger< TInteger >))
DirIterator sOrthDirs(const SCell &p) const
Cell uIncident(const Cell &c, Dimension k, bool up) const
SCell sIncident(const SCell &c, Dimension k, bool up) const
SignedKhalimskyCell< dim, Integer > SCell
SpaceND< dim, Integer > Space
Integer uDistanceToMax(const Cell &p, Dimension k) const
SCell sAdjacent(const SCell &p, Dimension k, bool up) const
Point uCoords(const Cell &c) const
Integer sDistanceToMin(const SCell &p, Dimension k) const
SPreCell const & preCell() const
Returns the underlying constant signed pre-cell.
void uSetCoords(Cell &c, const Point &kp) const
SCell sGetMin(SCell p, Dimension k) const
Point sCoords(const SCell &c) const
bool sIsSurfel(const SCell &b) const
std::set< Cell > CellSet
Preferred type for defining a set of Cell(s).
DGtal is the top-level namespace which contains all DGtal functions and types.
SCell sGetIncr(const SCell &p, Dimension k) const
Cells uProperNeighborhood(const Cell &cell) const
std::map< Cell, Value > Type
bool uIsMin(const Cell &p, Dimension k) const
Integer uFirst(const PreCell &p, Dimension k) const
void uAddFaces(Cells &faces, const Cell &c, Dimension axis) const
Integer uKCoord(const Cell &c, Dimension k) const
Integer sKCoord(const SCell &c, Dimension k) const
Represents a signed cell in a cellular grid space by its Khalimsky coordinates and a boolean value...
SCell sGetMax(SCell p, Dimension k) const
void sSetCoord(SCell &c, Dimension k, Integer i) const
Cell uProjection(const Cell &p, const Cell &bound, Dimension k) const
PointVector< dim, Integer > Point
SignedKhalimskyPreCell< dim, Integer > SPreCell
SCell sIndirectIncident(const SCell &p, Dimension k) const
static const constexpr Sign POS
SCells sUpperIncident(const SCell &c) const
Integer sTopology(const SCell &p) const
Dimension sDim(const SCell &p) const
KhalimskyCell & operator=(const KhalimskyCell &other)=default
bool uNext(Cell &p, const Cell &lower, const Cell &upper) const
void uSetKCoord(Cell &c, Dimension k, Integer i) const
bool cIsInside(const Point &p, Dimension k) const
SignedKhalimskyCell(const Point &aPoint, bool positive)
typename NumberTraits< Integer >::UnsignedVersion UnsignedInteger
Integer uLast(const PreCell &p, Dimension k) const
Cells uFaces(const Cell &c) const
Closure getClosure(Dimension k) const
bool isSpaceClosed() const
Cell unsigns(const SCell &p) const
SCell sGetDecr(const SCell &p, Dimension k) const
typename PreCellularGridSpace::DirIterator DirIterator
Cell uSpel(Point p) const
void sSetKCoord(SCell &c, Dimension k, Integer i) const
boost::int32_t int32_t
signed 32-bit integer.
Definition: BasicTypes.h:72
Cells uUpperIncident(const Cell &c) const
Integer sFirst(const SPreCell &p, Dimension k) const
static const constexpr Dimension dimension
typename PreCellularGridSpace::template AnyCellCollection< CellType > AnyCellCollection
SCell sTranslation(const SCell &p, const Vector &vec) const
bool sIsOpen(const SCell &p, Dimension k) const
bool operator!=(const SignedKhalimskyCell &other) const
static const constexpr Sign NEG
KhalimskyCell(const Point &aPoint)
Aim: This class is a model of CCellularGridSpaceND. It represents the cubical grid as a cell complex...
Represents an (unsigned) cell in a cellular grid space by its Khalimsky coordinates.
bool operator==(const KhalimskyCell &other) const
Integer sCoord(const SCell &c, Dimension k) const
bool sDirect(const SCell &p, Dimension k) const
SCells sProperNeighborhood(const SCell &cell) const
AnyCellCollection< SCell > SCells
SCell sGetAdd(const SCell &p, Dimension k, Integer x) const
void uSetKCoords(Cell &c, const Point &kp) const
Integer uTopology(const Cell &p) const
SCells sNeighborhood(const SCell &cell) const
AnyCellCollection< Cell > Cells
The dimension is closed and non-periodic.
SCell sGetSub(const SCell &p, Dimension k, Integer x) const
TInteger Integer
Arithmetic ring induced by (+,-,*) and Integer numbers.
KhalimskySpaceND & operator=(const KhalimskySpaceND &other)=default
Size size(Dimension k) const
Cell uTranslation(const Cell &p, const Vector &vec) const
Cell uGetIncr(const Cell &p, Dimension k) const