Aim: This concept describes a cellular grid space in nD. In these spaces obtained by cartesian product, cells have a cubic shape that depends on the dimension: 0-cells are points, 1-cells are unit segments, 2-cells are squares, 3-cells are cubes, and so on.
This concept is rather complex since it gathers all possible operations on cells. The idea is that only the space knows what are the cells, how to compute their adjacent or incident cells, how to extract their coordinates, where are the bounds, what is the topology and dimension of a cell, etc. Worse (!), you have two kinds of cells, normal cells (unsigned), and oriented cells (signed). The latter are used to define orientation and boundary operators.
The space is generally finite (except for arbitrary size integers). The user should choose between a closed (default) cell space or an open cell space.
Name | Expression | Type requirements | Return type | Precondition | Semantics | Post condition | Complexity |
dimension | X::dimension | | Dimension | | the dimension of the space | | |
DIM | X::dimension | | Dimension | | the dimension of the space | | |
POS | X::POS | | Sign | | the positive sign for cells | | |
NEG | X::NEG | | Sign | | the negative sign for cells | | |
| | | | | | | |
initialization | x.init(p1, p2, b) | b is bool | bool | | initializes the space so that cells are within the bounds p1 and p2, returns true iff the initialization was valid (ie, such bounds are representable with these integers). | | |
Size or width | x.size( k ) | | Integer | | returns the size/width of the space along the axis k | | |
Minimal coordinate | x.min( k ) | | Integer | | returns the minimal possible digital coordinate along the axis k | | |
Maximal coordinate | x.max( k ) | | Integer | | returns the maximal possible digital coordinate along the axis k | | |
Lower bound | x.lowerBound() | | Point | | returns the lowest point in the space, i.e. p1 | | |
Upper bound | x.upperBound() | | Point | | returns the uppermost point in the space, i.e. p1 | | |
Lower cell | x.lowerCell() | | Cell | | returns the lowest cell in the space | | |
Upper cell | x.upperCell() | | Cell | | returns the uppermost cell in the space | | |
Closedness | x.isSpaceClosed() | | bool | | returns 'true' iff the cellular space is closed | | |
| | | | | | | |
Make unsigned cell | x.uCell(p) | | Cell | | returns the unsigned cell with Khalimsky coordinates equal to p | | |
Make unsigned cell | x.uCell(p, c) | | Cell | | returns the unsigned cell with digital coordinates equal to p and topology equal to c | | |
Make signed cell | x.sCell(p, sign = POS) | | SCell | | returns the signed cell with Khalimsky coordinates equal to p and sign sign | | |
Make signed cell | x.sCell(p, sc) | | SCell | | returns the signed cell with digital coordinates equal to p and sign and topology equal to sc | | |
Make unsigned spel | x.uSpel(p) | | Cell | | returns the unsigned spel with digital coordinates equal to p | | |
Make signed spel | x.sSpel(p, sign = POS) | | SCell | | returns the signed spel with digital coordinates equal to p and sign sign | | |
Make unsigned pointel | x.uPointel(p) | | Cell | | returns the unsigned pointel with digital coordinates equal to p | | |
Make signed pointel | x.sPointel(p, sign = POS) | | SCell | | returns the signed pointel with digital coordinates equal to p and sign sign | | |
| | | | | | | |
Get Khalimsky coordinate | x.uKCoord(c, k) | | Integer | | returns the Khalimsky coordinate of cell c along axis k | | |
Get digital coordinate | x.uCoord(c, k) | | Integer | | returns the digital coordinate of cell c along axis k | | |
Get Khalimsky coordinates | x.uKCoords(c) | | Point | | returns the Khalimsky coordinates of cell c | | |
Get digital coordinates | x.uCoords(c) | | Point | | returns the digital coordinates of cell c | | |
Get Khalimsky coordinate | x.sKCoord(sc, k) | | Integer | | returns the Khalimsky coordinate of signed cell sc along axis k | | |
Get digital coordinate | x.sCoord(sc, k) | | Integer | | returns the digital coordinate of signed cell sc along axis k | | |
Get Khalimsky coordinates | x.sKCoords(sc, k) | | Point | | returns the Khalimsky coordinates of signed cell sc | | |
Get digital coordinates | x.sCoords(sc, k) | | Point | | returns the digital coordinates of signed cell sc | | |
| | | | | | | |
Set Khalimsky coordinate | x.uSetKCoord(c,k,i) | | | | Sets the k-th Khalimsky coordinate of c to i | | |
Set digital coordinate | x.uSetCoord(c,k,i) | | | | Sets the k-th digital coordinate of c to i | | |
Set Khalimsky coordinates | x.uSetKCoords(c,p) | | | | Sets the Khalimsky coordinates of c to p | | |
Set digital coordinates | x.uSetCoords(c,p) | | | | Sets the digital coordinates of c to p | | |
Set Khalimsky coordinate | x.sSetKCoord(sc,k,i) | | | | Sets the k-th Khalimsky coordinate of sc to i | | |
Set digital coordinate | x.sSetCoord(sc,k,i) | | | | Sets the k-th digital coordinate of sc to i | | |
Set Khalimsky coordinates | x.sSetKCoords(sc,p) | | | | Sets the Khalimsky coordinates of sc to p | | |
Set digital coordinates | x.sSetCoords(sc,p) | | | | Sets the digital coordinates of sc to p | | |
| | | | | | | |
Sign/orient cell | x.signs(c,sign) | | | | returns the signed cell with same topology as c and sign sign | | |
Change sign | x.sSetSign(sc, sign) | | | | Sets the sign of the signed cell sc to sign | | |
Get sign | x.sSign(sc) | | Sign | | returns the sign of cell sc | | |
Unsign/unorient signed cell | x.unsigns(sc) | | | | returns the unsigned cell with same topology as sc | | |
Flip sign | x.sOpp(sc) | | | | returns the signed cell with opposite sign to sc | | |
| | | | | | | |
Get topology word | x.uTopology(c) | | Integer | | returns the topology word of unsigned cell c | | |
Get topology word | x.sTopology(sc) | | Integer | | returns the topology word of signed cell sc | | |
Get cell dimension | x.uDim(c) | | Dimension | | returns the dimension of the unsigned cell c | | |
Get cell dimension | x.sDim(sc) | | Dimension | | returns the dimension of the signed cell sc | | |
Surfel test | x.uIsSurfel(s) | | bool | | returns 'true' iff the unsigned cell c has dimension n-1 | | |
Surfel test | x.sIsSurfel(sc) | | bool | | returns 'true' iff the signed cell sc has dimension n-1 | | |
Open test | x.uIsOpen(c,k) | | bool | | returns 'true' iff the unsigned cell c is open along the k-th axis | | |
Open test | x.sIsOpen(sc,k) | | bool | | returns 'true' iff the signed cell sc is open along the k-th axis | | |
| | | | | | | |
Get open directions | x.uDirs(c) | | DirIterator | | returns a kind of iterator that enumerates the open directions of c | | |
Get open directions | x.sDirs(sc) | | DirIterator | | returns a kind of iterator that enumerates the open directions of sc | | |
Get closed directions | x.uOrthDirs(c) | | DirIterator | | returns a kind of iterator that enumerates the closed directions of c | | |
Get closed directions | x.sOrthDirs(sc) | | DirIterator | | returns a kind of iterator that enumerates the closed directions of sc | | |
Get closed direction of surfel | x.uOrthDir(c) | x.uIsSurfel(c) | Dimension | | returns the closed direction of the n-1-cell c | | |
Get closed direction of surfel | x.sOrthDir(sc) | x.sIsSurfel(sc) | Dimension | | returns the closed direction of the signed n-1-cell sc | | |
| | | | | | | |
Get first cell | x.uFirst(c) | | Cell | | returns the first cell of the space with same topology as c | | |
Get last cell | x.uLast(c) | | Cell | | returns the last cell of the space with same topology as c | | |
Get next cell along some axis | x.uGetIncr(c,k) | | Cell | | returns the same cell as c except the k-th coordinate that is incremented | | |
Get previous cell along some axis | x.uGetDecr(c,k) | | Cell | | returns the same cell as c except the k-th coordinate that is decremented | | |
Maximal coordinate test | x.uIsMax(c,k) | | bool | | returns 'true' iff the cell has the maximal possible k-th coordinate | | |
Minimal coordinate test | x.uIsMin(c,k) | | bool | | returns 'true' iff the cell has the minimal possible k-th coordinate | | |
Get maximal cell along some axis | x.uGetMax(c,k) | | Cell | | returns the same cell as c except the k-th coordinate that is the maximal possible | | |
Get minimal cell along some axis | x.uGetMin(c,k) | | Cell | | returns the same cell as c except the k-th coordinate that is the minimal possible | | |
Inside test along some axis | x.uIsInside(c,k) | | bool | | returns 'true' iff the cell c has a valid k-th coordinate | | |
Get cell further along some axis | x.uGetAdd(c,k,i) | | Cell | | returns the same cell as c except the k-th coordinate that is increased by i | | |
Get cell before along some axis | x.uGetSub(c,k,i) | | Cell | | returns the same cell as c except the k-th coordinate that is decreased by i | | |
Distance to upper bound | x.uDistanceToMax(c,k) | | Integer | | returns the number of increments to do along the k-th axis to reach the upper bound | | |
Distance to lower bound | x.uDistanceToMin(c,k) | | Integer | | returns the number of decrements to do along the k-th axis to reach the lower bound | | |
Get the translation of a cell | x.uTranslation(c,v) | | Cell | | returns the cell that is the translation of c by the vector v | | |
Get the projection of a cell | x.uProjection(c,bc,k) | bc is a Cell | Cell | | returns the same cell as c except for the k-th coordinate that is equal to the one of bc | | |
Projection of a cell | x.uProject(c,bc,k) | bc is a Cell | | | modifies cell c such that its k-th coordinate that is equal to the one of bc | | |
Next cell within bounds | x.uNext(c,lc,uc) | lc, uc are Cell | bool | | cell c becomes the next cell with same topology within lower and upper bounds lc and uc, returns 'true' iff c is still within bounds | | |
| | | | | | | |
Get first cell | x.sFirst(sc) | | SCell | | returns the first cell of the space with same topology as sc | | |
Get last cell | x.sLast(sc) | | SCell | | returns the last cell of the space with same topology as sc | | |
Get next cell along some axis | x.sGetIncr(sc,k) | | SCell | | returns the same cell as sc except the k-th coordinate that is incremented | | |
Get previous cell along some axis | x.sGetDecr(sc,k) | | SCell | | returns the same cell as sc except the k-th coordinate that is decremented | | |
Maximal coordinate test | x.sIsMax(sc,k) | | bool | | returns 'true' iff the cell has the maximal possible k-th coordinate | | |
Minimal coordinate test | x.sIsMin(sc,k) | | bool | | returns 'true' iff the cell has the minimal possible k-th coordinate | | |
Get maximal cell along some axis | x.sGetMax(sc,k) | | SCell | | returns the same cell as sc except the k-th coordinate that is the maximal possible | | |
Get minimal cell along some axis | x.sGetMin(sc,k) | | SCell | | returns the same cell as sc except the k-th coordinate that is the minimal possible | | |
Inside test along some axis | x.sIsInside(sc,k) | | bool | | returns 'true' iff the cell sc has a valid k-th coordinate | | |
Get cell further along some axis | x.sGetAdd(sc,k,i) | | SCell | | returns the same cell as sc except the k-th coordinate that is increased by i | | |
Get cell before along some axis | x.sGetSub(sc,k,i) | | SCell | | returns the same cell as sc except the k-th coordinate that is decreased by i | | |
Distance to upper bound | x.sDistanceToMax(sc,k) | | Integer | | returns the number of increments to do along the k-th axis to reach the upper bound | | |
Distance to lower bound | x.sDistanceToMin(sc,k) | | Integer | | returns the number of decrements to do along the k-th axis to reach the lower bound | | |
Get the translation of a cell | x.sTranslation(sc,v) | | SCell | | returns the cell that is the translation of sc by the vector v | | |
Get the projection of a cell | x.sProjection(sc,bc,k) | bc is a SCell | SCell | | returns the same cell as sc except for the k-th coordinate that is equal to the one of bc | | |
Projection of a cell | x.sProject(sc,bc,k) | bc is a SCell | | | modifies cell sc such that its k-th coordinate that is equal to the one of bc | | |
Next cell within bounds | x.sNext(sc,lc,uc) | lc, uc are SCell | bool | | cell sc becomes the next cell with same topology within lower and upper bounds lc and uc, returns 'true' iff sc is still within bounds | | |
| | | | | | | |
Neighborhood | x.uNeighborhood(c) | | Cells | | returns the range of cells that forms the 1-neighborhood of c | | |
Neighborhood | x.sNeighborhood(sc) | | SCells | | returns the range of signed cells that forms the 1-neighborhood of sc | | |
Proper neighborhood | x.uProperNeighborhood(c) | | Cells | | returns the range of cells that forms the proper 1-neighborhood of c, hence without c itself | | |
Proper neighborhood | x.sProperNeighborhood(sc) | | SCells | | returns the range of signed cells that forms the proper 1-neighborhood of sc, hence without sc itself | | |
Adjacent cell | x.uAdjacent(c,k,b) | b is a bool | Cell | | return the cell adjacent to c along axis k either with greater coordinate (b is true ) or lesser | | |
Adjacent cell | x.sAdjacent(sc,k,b) | b is a bool | SCell | | return the signed cell adjacent to sc along axis k either with greater coordinate (b is true ) or lesser | | |
| | | | | | | |
Incident cell | x.uIncident(c,k,b) | b is a bool | Cell | | return the cell incident to c along axis k either with greater coordinate (b is true ) or lesser | | |
Incident cell | x.sIncident(sc,k,b) | b is a bool | SCell | | return the signed cell incident to sc along axis k either with greater coordinate (b is true ) or lesser | | |
Lower incident cells | x.uLowerIncident(c) | | Cells | | return all the cells just lower incident to c (1-dim less) | | |
Lower incident cells | x.sLowerIncident(sc) | | SCells | | return all the signed cells just lower incident to sc (1-dim less) | | |
Upper incident cells | x.uUpperIncident(c) | | Cells | | return all the cells just upper incident to c (1-dim more) | | |
Upper incident cells | x.sUpperIncident(sc) | | SCells | | return all the signed cells just upper incident to c (1-dim more) | | |
Faces of a cell | x.uFaces(c) | | Cells | | return all the faces of the cell c | | |
Co-Faces of a cell | x.uCoFaces(c) | | Cells | | return all the co-faces of the cell c | | |
Direct orientation | x.sDirect(sc,k) | | bool | | return the direct orientation of cell sc along axis k | | |
Direct incident cell | x.sDirectIncident(sc,k) | | SCell | | return the signed cell that is the direct incident cell to sc along axis k | | |
Indirect incident cell | x.sIndirectIncident(sc,k) | | SCell | | return the signed cell that is the indirect incident cell to sc along axis k | | |