DGtal 1.3.0
Loading...
Searching...
No Matches
KhalimskyPreSpaceND.h
1
17#pragma once
18
31#if defined(KhalimskyPreSpaceND_RECURSES)
32#error Recursive header files inclusion detected in KhalimskyPreSpaceND.h
33#else // defined(KhalimskyPreSpaceND_RECURSES)
35#define KhalimskyPreSpaceND_RECURSES
36
37#if !defined KhalimskyPreSpaceND_h
39#define KhalimskyPreSpaceND_h
40
42// Inclusions
43#include <iostream>
44#include <set>
45#include <map>
46#include <DGtal/base/Common.h>
47#include <DGtal/kernel/CInteger.h>
48#include <DGtal/kernel/PointVector.h>
49#include <DGtal/kernel/SpaceND.h>
51
52namespace DGtal
53{
54
56 // Pre-declaration
57 template <
59 typename TInteger = DGtal::int32_t
60 >
61 class KhalimskyPreSpaceND;
62
64
70 template < Dimension dim,
71 typename TInteger = DGtal::int32_t >
73 {
74
77
78 // Aliases
79 public:
80 using Integer = TInteger;
84 using PreCell = Self;
87
88 // Public members
89 public:
91
92 // Standard interface
93 public:
94
96 PreCell const& preCell() const;
97
99 explicit KhalimskyPreCell( Integer dummy = 0 );
100
101
106
110 KhalimskyPreCell( KhalimskyPreCell const& aCell ) = default;
111
115 KhalimskyPreCell & operator=( KhalimskyPreCell const& aCell ) = default;
116
120 KhalimskyPreCell( KhalimskyPreCell && aCell ) = default;
121
126
131 bool operator==( const KhalimskyPreCell & other ) const;
132
137 bool operator!=( const KhalimskyPreCell & other ) const;
138
143 bool operator<( const KhalimskyPreCell & other ) const;
144
145 // --------------- CDrawableWithBoard2D realization -------------------
146 public:
147
152 std::string className() const;
153
154 }; // KhalimskyPreCell
155
156 template < Dimension dim,
157 typename TInteger >
158 std::ostream &
159 operator<<( std::ostream & out,
160 const KhalimskyPreCell< dim, TInteger > & object );
161
168 template < Dimension dim,
169 typename TInteger = DGtal::int32_t >
171 {
172
173 // Integer must be a model of the concept CInteger.
175
176 // Aliases
177 public:
178 using Integer = TInteger;
182 using SPreCell = Self;
185
186 // Public members
187 public:
189 bool positive;
190
191 // Standard interface
192 public:
193
195 SPreCell const& preCell() const;
196
198 explicit SignedKhalimskyPreCell( Integer dummy = 0 );
199
206
211
216
221
226
231 bool operator==( const SignedKhalimskyPreCell & other ) const;
232
237 bool operator!=( const SignedKhalimskyPreCell & other ) const;
238
243 bool operator<( const SignedKhalimskyPreCell & other ) const;
244
245 // --------------- CDrawableWithBoard2D realization -------------------
246 public:
247
252 std::string className() const;
253
254 }; // SignedKhalimskyPreCell
255
256 template < Dimension dim,
257 typename TInteger >
258 std::ostream &
259 operator<<( std::ostream & out,
261
279 template < Dimension dim,
280 typename TInteger = DGtal::int32_t >
282 {
283 public:
284 typedef TInteger Integer;
285 // Cells
288
289 public:
295 explicit PreCellDirectionIterator( Cell cell, bool open = true );
296
302 explicit PreCellDirectionIterator( SCell scell, bool open = true );
303
309
312
320 bool operator!=( const Integer ) const;
321
326 bool end() const;
327
332 bool operator!=( const PreCellDirectionIterator & other ) const;
333
338 bool operator==( const PreCellDirectionIterator & other ) const;
339
340 private:
348 bool myOpen;
349
350 private:
352 void find();
353 };
354
356 // template class KhalimskyPreSpaceND
375 template <
377 typename TInteger
378 >
380 {
383
384 public:
386 using Integer = TInteger;
387
388 // Cells
391
392 using Surfel = SCell;
393 using Sign = bool;
395
396 // Points and Vectors
399
402
403 // static constants
404 static constexpr const Dimension dimension = dim;
405 static constexpr const Dimension DIM = dim;
406 static constexpr const Sign POS = true;
407 static constexpr const Sign NEG = false;
408
409 template <typename CellType>
410 struct AnyCellCollection : public std::deque<CellType> {
411 using Value = CellType;
412 using Container = typename std::deque<CellType>;
413 using Iterator = typename std::deque<CellType>::iterator;
414 using ConstIterator = typename std::deque<CellType>::const_iterator;
415 };
416
417 // Neighborhoods, Incident cells, Faces and Cofaces
420
421 // Sets, Maps
423 using CellSet = std::set<Cell>;
424
426 using SCellSet = std::set<SCell>;
427
429 using SurfelSet = std::set<SCell>;
430
433 template <typename Value> struct CellMap {
434 typedef std::map<Cell,Value> Type;
435 };
436
439 template <typename Value> struct SCellMap {
440 typedef std::map<SCell,Value> Type;
441 };
442
445 template <typename Value> struct SurfelMap {
446 typedef std::map<SCell,Value> Type;
447 };
448
449 // ----------------------- Pre-cell creation services --------------------------
453 public:
454
461 static Cell uCell( const Point & kp );
462
471 static Cell uCell( Point p, const Cell & c );
472
480 static SCell sCell( const Point & kp, Sign sign = POS );
481
490 static SCell sCell( Point p, const SCell & c );
491
498 static Cell uSpel( Point p );
499
507 static SCell sSpel( Point p, Sign sign = POS );
508
515 static Cell uPointel( Point p );
516
524 static SCell sPointel( Point p, Sign sign = POS );
525
527
528 // ----------------------- Read accessors to pre-cells ------------------------
532 public:
539 static Integer uKCoord( const Cell & c, Dimension k );
540
547 static Integer uCoord( const Cell & c, Dimension k );
548
554 static const Point & uKCoords( const Cell & c );
555
561 static Point uCoords( const Cell & c );
562
569 static Integer sKCoord( const SCell & c, Dimension k );
570
577 static Integer sCoord( const SCell & c, Dimension k );
578
584 static const Point & sKCoords( const SCell & c );
585
591 static Point sCoords( const SCell & c );
592
598 static Sign sSign( const SCell & c );
599
601
602 // ----------------------- Write accessors to pre-cells ------------------------
606 public:
607
613 static void uSetKCoord( Cell & c, Dimension k, Integer i );
614
620 static void sSetKCoord( SCell & c, Dimension k, Integer i );
621
627 static void uSetCoord( Cell & c, Dimension k, Integer i );
628
634 static void sSetCoord( SCell & c, Dimension k, Integer i );
635
640 static void uSetKCoords( Cell & c, const Point & kp );
641
646 static void sSetKCoords( SCell & c, const Point & kp );
647
652 static void uSetCoords( Cell & c, const Point & kp );
653
658 static void sSetCoords( SCell & c, const Point & kp );
659
664 static void sSetSign( SCell & c, Sign s );
665
667
668 // -------------------- Conversion signed/unsigned ------------------------
672 public:
678 static SCell signs( const Cell & p, Sign s );
679
684 static Cell unsigns( const SCell & p );
685
690 static SCell sOpp( const SCell & p );
691
693
694 // ------------------------- Pre-cell topology services -----------------------
698 public:
703 static Integer uTopology( const Cell & p );
704
710 static Integer sTopology( const SCell & p );
711
717 static Dimension uDim( const Cell & p );
718
724 static Dimension sDim( const SCell & p );
725
731 static bool uIsSurfel( const Cell & b );
732
738 static bool sIsSurfel( const SCell & b );
739
746 static bool uIsOpen( const Cell & p, Dimension k );
747
754 static bool sIsOpen( const SCell & p, Dimension k );
755
757
758 // -------------------- Iterator services for pre-cells ------------------------
762 public:
763
784 static DirIterator uDirs( const Cell & p );
785
806 static DirIterator sDirs( const SCell & p );
807
828 static DirIterator uOrthDirs( const Cell & p );
829
850 static DirIterator sOrthDirs( const SCell & p );
851
858 static Dimension uOrthDir( const Cell & s );
859
866 static Dimension sOrthDir( const SCell & s );
867
869
870 // -------------------- Unsigned pre-cell geometry services --------------------
874 public:
875
884 static Cell uGetIncr( Cell p, Dimension k );
885
894 static bool uIsMax( const Cell & p, Dimension k );
895
896
905 static bool uIsInside( const Cell & p, Dimension k );
906
907
915 static bool uIsInside( const Cell & p );
916
925 static Cell uGetDecr( Cell p, Dimension k );
926
935 static bool uIsMin( const Cell & p, Dimension k );
936
946 static Cell uGetAdd( Cell p, Dimension k, Integer x );
947
957 static Cell uGetSub( Cell p, Dimension k, Integer x );
958
965 static Cell uTranslation( Cell p, const Vector & vec );
966
979 static Cell uProjection( Cell p, const Cell & bound, Dimension k );
980
990 static void uProject( Cell & p, const Cell & bound, Dimension k );
991
1013 static bool uNext( Cell & p, const Cell & lower, const Cell & upper );
1014
1016
1017 // -------------------- Signed pre-cell geometry services --------------------
1021 public:
1022
1032
1041 static bool sIsMax( const SCell & p, Dimension k );
1042
1043
1052 static bool sIsInside( const SCell & p, Dimension k );
1053
1054
1062 static bool sIsInside( const SCell & p );
1063
1073
1082 static bool sIsMin( const SCell & p, Dimension k );
1083
1094
1105
1112 static SCell sTranslation( SCell p, const Vector & vec );
1113
1126 static SCell sProjection( SCell p, const SCell & bound, Dimension k );
1127
1137 static void sProject( SCell & p, const SCell & bound, Dimension k );
1138
1160 static bool sNext( SCell & p, const SCell & lower, const SCell & upper );
1161
1163
1164 // ----------------------- Neighborhood services --------------------------
1168 public:
1169
1178 static Cells uNeighborhood( const Cell & cell );
1179
1188 static SCells sNeighborhood( const SCell & cell );
1189
1199 static Cells uProperNeighborhood( const Cell & cell );
1200
1210 static SCells sProperNeighborhood( const SCell & cell );
1211
1223 static Cell uAdjacent( const Cell & p, Dimension k, bool up );
1224
1236 static SCell sAdjacent( const SCell & p, Dimension k, bool up );
1237
1239
1240 // ----------------------- Incidence services --------------------------
1244 public:
1245
1257 static Cell uIncident( Cell c, Dimension k, bool up );
1258
1274 static SCell sIncident( SCell c, Dimension k, bool up );
1275
1281 static Cells uLowerIncident( const Cell & c );
1282
1288 static Cells uUpperIncident( const Cell & c );
1289
1296 static SCells sLowerIncident( const SCell & c );
1297
1304 static SCells sUpperIncident( const SCell & c );
1305
1311 static Cells uFaces( const Cell & c );
1312
1318 static Cells uCoFaces( const Cell & c );
1319
1336 static bool sDirect( const SCell & p, Dimension k );
1337
1347
1357
1358
1365 static Point interiorVoxel( const SCell & c ) ;
1366
1373 static Point exteriorVoxel( const SCell & c ) ;
1374
1376
1377
1378 // ------------------------- Internals ------------------------------------
1382 private:
1386 static void uAddFaces( Cells & faces, const Cell & c, Dimension axis );
1387
1391 static void uAddCoFaces( Cells & cofaces, const Cell & c, Dimension axis );
1392
1394
1395 // ----------------------- Interface --------------------------------------
1399 public:
1400
1405 static void selfDisplay ( std::ostream & out );
1406
1411 static constexpr bool isValid();
1412
1414
1415 }; // end of class KhalimskyPreSpaceND
1416
1423 template < Dimension dim,
1424 typename TInteger >
1425 std::ostream&
1426 operator<< ( std::ostream & out,
1427 const KhalimskyPreSpaceND<dim, TInteger > & object );
1428
1429} // namespace DGtal
1430
1431
1433// Includes inline functions.
1434#include "DGtal/topology/KhalimskyPreSpaceND.ih"
1435
1436// //
1438
1439#endif // !defined KhalimskyPreSpaceND_h
1440
1441#undef KhalimskyPreSpaceND_RECURSES
1442#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 const Point & sKCoords(const SCell &c)
Return its Khalimsky coordinates.
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 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 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 const Point & uKCoords(const Cell &c)
Return its Khalimsky coordinates.
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.
PreCellDirectionIterator & operator++()
Pre-increment. Go to next direction.
Dimension operator*() const
Return the current 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 ClosedIntegerHalfPlane< TSpace > &object)
DGtal::uint32_t Dimension
Definition: Common.h:137
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
bool operator!=(const KhalimskyPreCell &other) const
Difference operator.
BOOST_CONCEPT_ASSERT((concepts::CInteger< TInteger >))
Integer must be a model of the concept CInteger.
PreCell const & preCell() const
Returns the underlying constant pre-cell, itself in fact.
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 & operator=(KhalimskyPreCell &&aCell)=default
Move operator.
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.
KhalimskyPreCell & operator=(KhalimskyPreCell const &aCell)=default
Copy operator.
KhalimskyPreSpaceND< dim, TInteger > PreCellularGridSpace
KhalimskyPreCell(Integer dummy=0)
Default constructor.
bool operator<(const KhalimskyPreCell &other) const
Inferior operator. (lexicographic order).
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 & operator=(SignedKhalimskyPreCell const &aCell)=default
Copy operator.
SignedKhalimskyPreCell(Integer dummy=0)
Default constructor.
SPreCell const & preCell() const
Returns the underlying constant pre-cell, itself in fact.
SignedKhalimskyPreCell & operator=(SignedKhalimskyPreCell &&aCell)=default
Move operator.
BOOST_CONCEPT_ASSERT((concepts::CInteger< TInteger >))
bool operator==(const SignedKhalimskyPreCell &other) const
Equality 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)
Vector lower(const Vector &z, unsigned int k)
Vector upper(const Vector &z, unsigned int k)