DGtal  1.5.beta
KhalimskyPreSpaceND.h
1 
16 #pragma once
17 
30 #if defined(KhalimskyPreSpaceND_RECURSES)
31 #error Recursive header files inclusion detected in KhalimskyPreSpaceND.h
32 #else // defined(KhalimskyPreSpaceND_RECURSES)
34 #define KhalimskyPreSpaceND_RECURSES
35 
36 #if !defined KhalimskyPreSpaceND_h
38 #define KhalimskyPreSpaceND_h
39 
41 // Inclusions
42 #include <iostream>
43 #include <set>
44 #include <map>
45 #include <DGtal/base/Common.h>
46 #include <DGtal/kernel/CInteger.h>
47 #include <DGtal/kernel/PointVector.h>
48 #include <DGtal/kernel/SpaceND.h>
50 
51 namespace DGtal
52 {
53 
55  // Pre-declaration
56  template <
57  Dimension dim,
58  typename TInteger = DGtal::int32_t
59  >
60  class KhalimskyPreSpaceND;
61 
63 
69  template < Dimension dim,
70  typename TInteger = DGtal::int32_t >
72  {
73 
76 
77  // Aliases
78  public:
79  using Integer = TInteger;
83  using PreCell = Self;
86 
87  // Public members
88  public:
90 
91  // Standard interface
92  public:
93 
95  PreCell const& preCell() const;
96 
98  explicit KhalimskyPreCell( Integer dummy = 0 );
99 
100 
105 
109  KhalimskyPreCell( KhalimskyPreCell const& aCell ) = default;
110 
114  KhalimskyPreCell & operator=( KhalimskyPreCell const& aCell ) = default;
115 
119  KhalimskyPreCell( KhalimskyPreCell && aCell ) = default;
120 
124  KhalimskyPreCell & operator=( KhalimskyPreCell && aCell ) = default;
125 
130  bool operator==( const KhalimskyPreCell & other ) const;
131 
136  bool operator!=( const KhalimskyPreCell & other ) const;
137 
142  bool operator<( const KhalimskyPreCell & other ) const;
143 
144  // --------------- CDrawableWithBoard2D realization -------------------
145  public:
146 
151  std::string className() const;
152 
153  }; // KhalimskyPreCell
154 
155  template < Dimension dim,
156  typename TInteger >
157  std::ostream &
158  operator<<( std::ostream & out,
159  const KhalimskyPreCell< dim, TInteger > & object );
160 
167  template < Dimension dim,
168  typename TInteger = DGtal::int32_t >
170  {
171 
172  // Integer must be a model of the concept CInteger.
174 
175  // Aliases
176  public:
177  using Integer = TInteger;
181  using SPreCell = Self;
184 
185  // Public members
186  public:
188  bool positive;
189 
190  // Standard interface
191  public:
192 
194  SPreCell const& preCell() const;
195 
197  explicit SignedKhalimskyPreCell( Integer dummy = 0 );
198 
205 
210 
215 
220 
225 
230  bool operator==( const SignedKhalimskyPreCell & other ) const;
231 
236  bool operator!=( const SignedKhalimskyPreCell & other ) const;
237 
242  bool operator<( const SignedKhalimskyPreCell & other ) const;
243 
244  // --------------- CDrawableWithBoard2D realization -------------------
245  public:
246 
251  std::string className() const;
252 
253  }; // SignedKhalimskyPreCell
254 
255  template < Dimension dim,
256  typename TInteger >
257  std::ostream &
258  operator<<( std::ostream & out,
260 
278  template < Dimension dim,
279  typename TInteger = DGtal::int32_t >
281  {
282  public:
283  typedef TInteger Integer;
284  // Cells
287 
288  public:
294  explicit PreCellDirectionIterator( Cell cell, bool open = true );
295 
301  explicit PreCellDirectionIterator( SCell scell, bool open = true );
302 
308 
311 
319  bool operator!=( const Integer ) const;
320 
325  bool end() const;
326 
331  bool operator!=( const PreCellDirectionIterator & other ) const;
332 
337  bool operator==( const PreCellDirectionIterator & other ) const;
338 
339  private:
347  bool myOpen;
348 
349  private:
351  void find();
352  };
353 
355  // template class KhalimskyPreSpaceND
374  template <
375  Dimension dim,
376  typename TInteger
377  >
379  {
382 
383  public:
385  using Integer = TInteger;
386 
387  // Cells
390 
391  using Surfel = SCell;
392  using Sign = bool;
394 
395  // Points and Vectors
398 
401 
402  // static constants
403  static constexpr const Dimension dimension = dim;
404  static constexpr const Dimension DIM = dim;
405  static constexpr const Sign POS = true;
406  static constexpr const Sign NEG = false;
407 
408  template <typename CellType>
409  struct AnyCellCollection : public std::deque<CellType> {
410  using Value = CellType;
411  using Container = typename std::deque<CellType>;
412  using Iterator = typename std::deque<CellType>::iterator;
413  using ConstIterator = typename std::deque<CellType>::const_iterator;
414  };
415 
416  // Neighborhoods, Incident cells, Faces and Cofaces
419 
420  // Sets, Maps
422  using CellSet = std::set<Cell>;
423 
425  using SCellSet = std::set<SCell>;
426 
428  using SurfelSet = std::set<SCell>;
429 
432  template <typename Value> struct CellMap {
433  typedef std::map<Cell,Value> Type;
434  };
435 
438  template <typename Value> struct SCellMap {
439  typedef std::map<SCell,Value> Type;
440  };
441 
444  template <typename Value> struct SurfelMap {
445  typedef std::map<SCell,Value> Type;
446  };
447 
448  // ----------------------- Pre-cell creation services --------------------------
452  public:
453 
460  static Cell uCell( const Point & kp );
461 
470  static Cell uCell( Point p, const Cell & c );
471 
479  static SCell sCell( const Point & kp, Sign sign = POS );
480 
489  static SCell sCell( Point p, const SCell & c );
490 
497  static Cell uSpel( Point p );
498 
506  static SCell sSpel( Point p, Sign sign = POS );
507 
514  static Cell uPointel( Point p );
515 
523  static SCell sPointel( Point p, Sign sign = POS );
524 
526 
527  // ----------------------- Read accessors to pre-cells ------------------------
531  public:
538  static Integer uKCoord( const Cell & c, Dimension k );
539 
546  static Integer uCoord( const Cell & c, Dimension k );
547 
553  static const Point & uKCoords( const Cell & c );
554 
560  static Point uCoords( const Cell & c );
561 
568  static Integer sKCoord( const SCell & c, Dimension k );
569 
576  static Integer sCoord( const SCell & c, Dimension k );
577 
583  static const Point & sKCoords( const SCell & c );
584 
590  static Point sCoords( const SCell & c );
591 
597  static Sign sSign( const SCell & c );
598 
600 
601  // ----------------------- Write accessors to pre-cells ------------------------
605  public:
606 
612  static void uSetKCoord( Cell & c, Dimension k, Integer i );
613 
619  static void sSetKCoord( SCell & c, Dimension k, Integer i );
620 
626  static void uSetCoord( Cell & c, Dimension k, Integer i );
627 
633  static void sSetCoord( SCell & c, Dimension k, Integer i );
634 
639  static void uSetKCoords( Cell & c, const Point & kp );
640 
645  static void sSetKCoords( SCell & c, const Point & kp );
646 
651  static void uSetCoords( Cell & c, const Point & kp );
652 
657  static void sSetCoords( SCell & c, const Point & kp );
658 
663  static void sSetSign( SCell & c, Sign s );
664 
666 
667  // -------------------- Conversion signed/unsigned ------------------------
671  public:
677  static SCell signs( const Cell & p, Sign s );
678 
683  static Cell unsigns( const SCell & p );
684 
689  static SCell sOpp( const SCell & p );
690 
692 
693  // ------------------------- Pre-cell topology services -----------------------
697  public:
702  static Integer uTopology( const Cell & p );
703 
709  static Integer sTopology( const SCell & p );
710 
716  static Dimension uDim( const Cell & p );
717 
723  static Dimension sDim( const SCell & p );
724 
730  static bool uIsSurfel( const Cell & b );
731 
737  static bool sIsSurfel( const SCell & b );
738 
745  static bool uIsOpen( const Cell & p, Dimension k );
746 
753  static bool sIsOpen( const SCell & p, Dimension k );
754 
756 
757  // -------------------- Iterator services for pre-cells ------------------------
761  public:
762 
783  static DirIterator uDirs( const Cell & p );
784 
805  static DirIterator sDirs( const SCell & p );
806 
827  static DirIterator uOrthDirs( const Cell & p );
828 
849  static DirIterator sOrthDirs( const SCell & p );
850 
857  static Dimension uOrthDir( const Cell & s );
858 
865  static Dimension sOrthDir( const SCell & s );
866 
868 
869  // -------------------- Unsigned pre-cell geometry services --------------------
873  public:
874 
883  static Cell uGetIncr( Cell p, Dimension k );
884 
893  static bool uIsMax( const Cell & p, Dimension k );
894 
895 
904  static bool uIsInside( const Cell & p, Dimension k );
905 
906 
914  static bool uIsInside( const Cell & p );
915 
924  static Cell uGetDecr( Cell p, Dimension k );
925 
934  static bool uIsMin( const Cell & p, Dimension k );
935 
945  static Cell uGetAdd( Cell p, Dimension k, Integer x );
946 
956  static Cell uGetSub( Cell p, Dimension k, Integer x );
957 
964  static Cell uTranslation( Cell p, const Vector & vec );
965 
978  static Cell uProjection( Cell p, const Cell & bound, Dimension k );
979 
989  static void uProject( Cell & p, const Cell & bound, Dimension k );
990 
1012  static bool uNext( Cell & p, const Cell & lower, const Cell & upper );
1013 
1015 
1016  // -------------------- Signed pre-cell geometry services --------------------
1020  public:
1021 
1030  static SCell sGetIncr( SCell p, Dimension k );
1031 
1040  static bool sIsMax( const SCell & p, Dimension k );
1041 
1042 
1051  static bool sIsInside( const SCell & p, Dimension k );
1052 
1053 
1061  static bool sIsInside( const SCell & p );
1062 
1071  static SCell sGetDecr( SCell p, Dimension k );
1072 
1081  static bool sIsMin( const SCell & p, Dimension k );
1082 
1092  static SCell sGetAdd( SCell p, Dimension k, Integer x );
1093 
1103  static SCell sGetSub( SCell p, Dimension k, Integer x );
1104 
1111  static SCell sTranslation( SCell p, const Vector & vec );
1112 
1125  static SCell sProjection( SCell p, const SCell & bound, Dimension k );
1126 
1136  static void sProject( SCell & p, const SCell & bound, Dimension k );
1137 
1159  static bool sNext( SCell & p, const SCell & lower, const SCell & upper );
1160 
1162 
1163  // ----------------------- Neighborhood services --------------------------
1167  public:
1168 
1177  static Cells uNeighborhood( const Cell & cell );
1178 
1187  static SCells sNeighborhood( const SCell & cell );
1188 
1198  static Cells uProperNeighborhood( const Cell & cell );
1199 
1209  static SCells sProperNeighborhood( const SCell & cell );
1210 
1222  static Cell uAdjacent( const Cell & p, Dimension k, bool up );
1223 
1235  static SCell sAdjacent( const SCell & p, Dimension k, bool up );
1236 
1238 
1239  // ----------------------- Incidence services --------------------------
1243  public:
1244 
1256  static Cell uIncident( Cell c, Dimension k, bool up );
1257 
1273  static SCell sIncident( SCell c, Dimension k, bool up );
1274 
1280  static Cells uLowerIncident( const Cell & c );
1281 
1287  static Cells uUpperIncident( const Cell & c );
1288 
1295  static SCells sLowerIncident( const SCell & c );
1296 
1303  static SCells sUpperIncident( const SCell & c );
1304 
1310  static Cells uFaces( const Cell & c );
1311 
1317  static Cells uCoFaces( const Cell & c );
1318 
1335  static bool sDirect( const SCell & p, Dimension k );
1336 
1346 
1356 
1357 
1364  static Point interiorVoxel( const SCell & c ) ;
1365 
1372  static Point exteriorVoxel( const SCell & c ) ;
1373 
1375 
1376 
1377  // ------------------------- Internals ------------------------------------
1381  private:
1385  static void uAddFaces( Cells & faces, const Cell & c, Dimension axis );
1386 
1390  static void uAddCoFaces( Cells & cofaces, const Cell & c, Dimension axis );
1391 
1393 
1394  // ----------------------- Interface --------------------------------------
1398  public:
1399 
1404  static void selfDisplay ( std::ostream & out );
1405 
1410  static constexpr bool isValid();
1411 
1413 
1414  }; // end of class KhalimskyPreSpaceND
1415 
1422  template < Dimension dim,
1423  typename TInteger >
1424  std::ostream&
1425  operator<< ( std::ostream & out,
1426  const KhalimskyPreSpaceND<dim, TInteger > & object );
1427 
1428 } // namespace DGtal
1429 
1430 
1432 // Includes inline functions.
1433 #include "DGtal/topology/KhalimskyPreSpaceND.ih"
1434 
1435 // //
1437 
1438 #endif // !defined KhalimskyPreSpaceND_h
1439 
1440 #undef KhalimskyPreSpaceND_RECURSES
1441 #endif // else defined(KhalimskyPreSpaceND_RECURSES)
Aim: This class is a model of CPreCellularGridSpaceND. It represents the cubical grid as a cell compl...
static Point exteriorVoxel(const SCell &c)
For a given surfel ((n-1)-signed cell), returns its exterior voxel (point in Z^d given by the indirec...
static Integer uTopology(const Cell &p)
Return the topology word of [p].
static bool sIsInside(const SCell &p, Dimension k)
Useful to check if you are going out of the space.
static Point uCoords(const Cell &c)
Return its digital coordinates.
static bool uIsInside(const Cell &p)
Useful to check if you are going out of the space.
static constexpr bool isValid()
Checks the validity/consistency of the object.
static SCells sProperNeighborhood(const SCell &cell)
Computes the proper 1-neighborhood of the pre-cell [c] and returns it.
static constexpr const Sign NEG
std::set< Cell > CellSet
Preferred type for defining a set of Cell(s).
static void uProject(Cell &p, const Cell &bound, Dimension k)
Projects [p] along the [k]th direction toward [bound].
static SCell sAdjacent(const SCell &p, Dimension k, bool up)
Return the adjacent element to [p] along axis [k] in the given direction and orientation.
BOOST_CONCEPT_ASSERT((concepts::CInteger< TInteger >))
Integer must be signed to characterize a ring.
static bool sIsMax(const SCell &p, Dimension k)
Useful to check if you are going out of the space.
static bool sIsSurfel(const SCell &b)
Return 'true' if [b] is a surfel (spans all but one coordinate).
static constexpr const Dimension dimension
static bool uIsInside(const Cell &p, Dimension k)
Useful to check if you are going out of the space.
static Cells uFaces(const Cell &c)
Return the proper faces of [c] (chain of lower incidence).
static void sSetKCoord(SCell &c, Dimension k, Integer i)
Sets the [k]-th Khalimsky coordinate of [c] to [i].
static void uSetCoords(Cell &c, const Point &kp)
Sets the digital coordinates of [c] to [kp].
static DirIterator sOrthDirs(const SCell &p)
Given a signed pre-cell [p], returns an iterator to iterate over each coordinate the cell does not sp...
static bool sIsMin(const SCell &p, Dimension k)
Useful to check if you are going out of the space.
static Dimension uOrthDir(const Cell &s)
Given an unsigned pre-surfel [s], returns its orthogonal direction (ie, the coordinate where the surf...
static Cells uCoFaces(const Cell &c)
Return the proper cofaces of [c] (chain of upper incidence).
static SCell sOpp(const SCell &p)
Creates the signed pre-cell with the inverse sign of [p].
static Cells uLowerIncident(const Cell &c)
Return the pre-cells directly low incident to c.
static void sProject(SCell &p, const SCell &bound, Dimension k)
Projects [p] along the [k]th direction toward [bound].
static void uAddCoFaces(Cells &cofaces, const Cell &c, Dimension axis)
Used by uCoFaces for computing incident cofaces.
static SCell sIndirectIncident(SCell p, Dimension k)
Return the indirect incident pre-cell of [p] along [k] (the incident cell along [k] whose sign is neg...
static SCells sLowerIncident(const SCell &c)
Return the signed pre-cells directly low incident to c.
static void sSetCoord(SCell &c, Dimension k, Integer i)
Sets the [k]-th digital coordinate of [c] to [i].
static Cell uProjection(Cell p, const Cell &bound, Dimension k)
Return the projection of [p] along the [k]th direction toward [bound].
static const Point & sKCoords(const SCell &c)
Return its Khalimsky coordinates.
static void uSetKCoord(Cell &c, Dimension k, Integer i)
Sets the [k]-th Khalimsky coordinate of [c] to [i].
static SCell sDirectIncident(SCell p, Dimension k)
Return the direct incident pre-cell of [p] along [k] (the incident pre-cell along [k])
static bool uIsMax(const Cell &p, Dimension k)
Useful to check if you are going out of the space.
static constexpr const Sign POS
static SCell signs(const Cell &p, Sign s)
Creates a signed pre-cell from an unsigned one and a given sign.
static Dimension uDim(const Cell &p)
Return the dimension of the pre-cell [p].
static void sSetCoords(SCell &c, const Point &kp)
Sets the digital coordinates of [c] to [kp].
static Point sCoords(const SCell &c)
Return its digital coordinates.
static bool uIsMin(const Cell &p, Dimension k)
Useful to check if you are going out of the space.
static bool uIsOpen(const Cell &p, Dimension k)
Return 'true' if [p] is open along the direction [k].
static Point interiorVoxel(const SCell &c)
For a given surfel ((n-1)-signed cell), returns its interior voxel (point in Z^d given by the direct ...
std::set< SCell > SCellSet
Preferred type for defining a set of SCell(s).
static Integer uKCoord(const Cell &c, Dimension k)
Return its Khalimsky coordinate along [k].
static Integer sCoord(const SCell &c, Dimension k)
Return its digital coordinate along [k].
std::set< SCell > SurfelSet
Preferred type for defining a set of surfels (always signed cells).
static SCell sSpel(Point p, Sign sign=POS)
From the digital coordinates of a point in Zn, builds the corresponding pre-spel (pre-cell of maximal...
static Integer uCoord(const Cell &c, Dimension k)
Return its digital coordinate along [k].
static SCell sGetIncr(SCell p, Dimension k)
Return the same element as [p] except for the incremented coordinate [k].
static Cell uGetSub(Cell p, Dimension k, Integer x)
Return the same element as [p] except for a coordinate [k] decremented with x.
static Cells uProperNeighborhood(const Cell &cell)
Computes the proper 1-neighborhood of the pre-cell [c] and returns it.
static SCell sIncident(SCell c, Dimension k, bool up)
Return the forward or backward signed pre-cell incident to [c] along axis [k], depending on [up].
static bool sIsInside(const SCell &p)
Useful to check if you are going out of the space.
static void sSetSign(SCell &c, Sign s)
Sets the sign of the pre-cell.
static Cell uTranslation(Cell p, const Vector &vec)
Add the vector [vec] to [p].
static DirIterator sDirs(const SCell &p)
Given a signed pre-cell [p], returns an iterator to iterate over each coordinate the cell spans....
TInteger Integer
Arithmetic ring induced by (+,-,*) and Integer numbers.
static void uAddFaces(Cells &faces, const Cell &c, Dimension axis)
Used by uFaces for computing incident faces.
static Cell unsigns(const SCell &p)
Creates an unsigned pre-cell from a signed one.
static Integer sKCoord(const SCell &c, Dimension k)
Return its Khalimsky coordinate along [k].
static Dimension sDim(const SCell &p)
Return the dimension of the pre-cell [p].
static const Point & uKCoords(const Cell &c)
Return its Khalimsky coordinates.
static bool uNext(Cell &p, const Cell &lower, const Cell &upper)
Increment the pre-cell [p] to its next position (as classically done in a scanning).
static Cells uNeighborhood(const Cell &cell)
Computes the 1-neighborhood of the pre-cell [c] and returns it.
static Dimension sOrthDir(const SCell &s)
Given a signed pre-surfel [s], returns its orthogonal direction (ie, the coordinate where the surfel ...
static Cell uAdjacent(const Cell &p, Dimension k, bool up)
Return the adjacent element to [p] along axis [k] in the given direction and orientation.
SignedKhalimskyPreCell< dim, Integer > SCell
static Cell uSpel(Point p)
From the digital coordinates of a point in Zn, builds the corresponding pre-spel (pre-cell of maximal...
static Cell uGetIncr(Cell p, Dimension k)
Return the same element as [p] except for the incremented coordinate [k].
static Cell uGetDecr(Cell p, Dimension k)
Return the same element as [p] except for an decremented coordinate [k].
static SCells sUpperIncident(const SCell &c)
Return the signed pre-cells directly up incident to c.
static SCells sNeighborhood(const SCell &cell)
Computes the 1-neighborhood of the pre-cell [c] and returns it.
static SCell sCell(const Point &kp, Sign sign=POS)
From the Khalimsky coordinates of a cell and a sign, builds the corresponding signed pre-cell.
static bool uIsSurfel(const Cell &b)
Return 'true' if [b] is a surfel (spans all but one coordinate).
static SCell sCell(Point p, const SCell &c)
From the digital coordinates of a point in Zn and a signed cell type, builds the corresponding signed...
static Cell uIncident(Cell c, Dimension k, bool up)
Return the forward or backward unsigned pre-cell incident to [c] along axis [k], depending on [up].
static SCell sGetAdd(SCell p, Dimension k, Integer x)
Return the same element as [p] except for a coordinate [k] incremented with x.
static bool sIsOpen(const SCell &p, Dimension k)
Return 'true' if [p] is open along the direction [k].
static void selfDisplay(std::ostream &out)
Writes/Displays the object on an output stream.
static Cell uGetAdd(Cell p, Dimension k, Integer x)
Return the same element as [p] except for a coordinate [k] incremented with x.
static bool sNext(SCell &p, const SCell &lower, const SCell &upper)
Increment the pre-cell [p] to its next position (as classically done in a scanning).
static void uSetCoord(Cell &c, Dimension k, Integer i)
Sets the [k]-th digital coordinate of [c] to [i].
static void uSetKCoords(Cell &c, const Point &kp)
Sets the Khalimsky coordinates of [c] to [kp].
static DirIterator uDirs(const Cell &p)
Given an unsigned pre-cell [p], returns an iterator to iterate over each coordinate the cell spans....
static SCell sGetSub(SCell p, Dimension k, Integer x)
Return the same element as [p] except for a coordinate [k] decremented with x.
static SCell sProjection(SCell p, const SCell &bound, Dimension k)
Return the projection of [p] along the [k]th direction toward [bound].
static void sSetKCoords(SCell &c, const Point &kp)
Sets the Khalimsky coordinates of [c] to [kp].
static SCell sGetDecr(SCell p, Dimension k)
Return the same element as [p] except for an decremented coordinate [k].
static constexpr const Dimension DIM
static Sign sSign(const SCell &c)
Return its sign.
static SCell sTranslation(SCell p, const Vector &vec)
Add the vector [vec] to [p].
static Cells uUpperIncident(const Cell &c)
Return the pre-cells directly up incident to c.
static Cell uCell(Point p, const Cell &c)
From the digital coordinates of a point in Zn and a cell type, builds the corresponding unsigned pre-...
static Integer sTopology(const SCell &p)
Return the topology word of [p].
static Cell uPointel(Point p)
From the digital coordinates of a point in Zn, builds the corresponding pre-pointel (pre-cell of dime...
static SCell sPointel(Point p, Sign sign=POS)
From the digital coordinates of a point in Zn, builds the corresponding pre-pointel (pre-cell of dime...
static DirIterator uOrthDirs(const Cell &p)
Given an unsigned pre-cell [p], returns an iterator to iterate over each coordinate the cell does not...
static Cell uCell(const Point &kp)
From the Khalimsky coordinates of a cell, builds the corresponding unsigned pre-cell.
static bool sDirect(const SCell &p, Dimension k)
Return 'true' if the direct orientation of [p] along [k] is in the positive coordinate direction.
This class is useful for looping on all "interesting" coordinates of a pre-cell.
Dimension myDir
the current direction.
PreCellDirectionIterator(Cell cell, bool open=true)
Constructor from a pre-cell.
KhalimskyPreCell< dim, Integer > Cell
SignedKhalimskyPreCell< dim, Integer > SCell
void find()
Look for next valid coordinate.
bool end() const
Return 'true' if the iteration is ended.
PreCellDirectionIterator(SCell scell, bool open=true)
Constructor from a signed pre-cell.
bool myOpen
If 'true', returns open coordinates, otherwise returns closed coordinates.
bool operator!=(const Integer) const
Fast comparison with unsigned integer (unused parameter).
bool operator!=(const PreCellDirectionIterator &other) const
Slow comparison with other iterator. Useful to check for end of loop.
Dimension operator*() const
Return the current direction.
PreCellDirectionIterator & operator++()
Pre-increment. Go to next direction.
bool operator==(const PreCellDirectionIterator &other) const
Slow comparison with other iterator.
DGtal is the top-level namespace which contains all DGtal functions and types.
std::ostream & operator<<(std::ostream &out, const ATu0v1< TKSpace, TLinearAlgebra > &object)
DGtal::uint32_t Dimension
Definition: Common.h:136
boost::int32_t int32_t
signed 32-bit integer.
Definition: BasicTypes.h:72
Represents an unsigned cell in an unbounded cellular grid space by its Khalimsky coordinates.
KhalimskyPreCell(KhalimskyPreCell &&aCell)=default
Move constructor.
typename NumberTraits< Integer >::UnsignedVersion UnsignedInteger
KhalimskyPreCell & operator=(KhalimskyPreCell &&aCell)=default
Move operator.
bool operator!=(const KhalimskyPreCell &other) const
Difference operator.
BOOST_CONCEPT_ASSERT((concepts::CInteger< TInteger >))
Integer must be a model of the concept CInteger.
std::string className() const
Return the style name used for drawing this object.
KhalimskyPreCell(KhalimskyPreCell const &aCell)=default
Copy constructor.
KhalimskyPreCell< dim, Integer > Self
KhalimskyPreCell(Point const &aPoint)
Implicit constructor from its Khalimsky coordinates.
bool operator==(const KhalimskyPreCell &other) const
Equality operator.
Point coordinates
Khalimsky coordinates of the cell. Public to allow easy coordinate manipulations.
KhalimskyPreSpaceND< dim, TInteger > PreCellularGridSpace
KhalimskyPreCell(Integer dummy=0)
Default constructor.
KhalimskyPreCell & operator=(KhalimskyPreCell const &aCell)=default
Copy operator.
bool operator<(const KhalimskyPreCell &other) const
Inferior operator. (lexicographic order).
PreCell const & preCell() const
Returns the underlying constant pre-cell, itself in fact.
typename std::deque< CellType >::const_iterator ConstIterator
typename std::deque< CellType >::iterator Iterator
std::decay< T >::type UnsignedVersion
Alias to the unsigned version of the number type.
Definition: NumberTraits.h:90
Represents a signed cell in an unbounded cellular grid space by its Khalimsky coordinates and a boole...
typename NumberTraits< Integer >::UnsignedVersion UnsignedInteger
bool operator!=(const SignedKhalimskyPreCell &other) const
Difference operator.
std::string className() const
Return the style name used for drawing this object.
SignedKhalimskyPreCell(Point const &aPoint, bool positive)
Implicit constructor from its Khalimsky coordinates.
SignedKhalimskyPreCell< dim, Integer > Self
Point coordinates
Khalimsky coordinates of the cell.
SignedKhalimskyPreCell(SignedKhalimskyPreCell &&aCell)=default
Move constructor.
bool operator<(const SignedKhalimskyPreCell &other) const
Inferior operator. (lexicographic order).
SignedKhalimskyPreCell(Integer dummy=0)
Default constructor.
BOOST_CONCEPT_ASSERT((concepts::CInteger< TInteger >))
SignedKhalimskyPreCell & operator=(SignedKhalimskyPreCell &&aCell)=default
Move operator.
SPreCell const & preCell() const
Returns the underlying constant pre-cell, itself in fact.
bool operator==(const SignedKhalimskyPreCell &other) const
Equality operator.
SignedKhalimskyPreCell & operator=(SignedKhalimskyPreCell const &aCell)=default
Copy operator.
KhalimskyPreSpaceND< dim, TInteger > PreCellularGridSpace
SignedKhalimskyPreCell(SignedKhalimskyPreCell const &aCell)=default
Copy constructor.
Aim: Concept checking for Integer Numbers. More precisely, this concept is a refinement of both CEucl...
Definition: CInteger.h:88
const Point aPoint(3, 4)
unsigned int dim(const Vector &z)
Vector lower(const Vector &z, unsigned int k)
Vector upper(const Vector &z, unsigned int k)