The ChainCon Software (Release 0.03)
|
An elementary cubical cell with vertex coordinates of integer type. More...
#include <cubcell.h>
Public Types | |
typedef CoordT | CoordType |
The type of coordinates. More... | |
typedef WrapT | WrapType |
The type of the coord wrapping class. More... | |
typedef EmptyT | EmptyType |
The type of the empty cell existence decision class. More... | |
Public Member Functions | |
tCubCell () | |
The default constructor of an empty cube. More... | |
template<class CoordArray > | |
tCubCell (int dimension, const CoordArray &coordinates) | |
The constructor of a full cube from an array of coordinates. More... | |
template<class CoordArray > | |
tCubCell (int dimension, const CoordArray &left, const CoordArray &right) | |
The constructor of a full cube from two arrays of coordinates. More... | |
tCubCell (const tCubCell< CoordT, WrapT, EmptyT > &c) | |
The copy constructor. More... | |
tCubCell (const tCubCell< CoordT, WrapT, EmptyT > &c, int n) | |
The constructor of the n-th boundary cube. More... | |
tCubCell (const tCubCell< CoordT, WrapT, EmptyT > &c, int n, int side) | |
The constructor of the n-th component of the Alexander-Whitney diagonal, either the left one (if side = 0), or the right one (if side = 1). More... | |
tCubCell< CoordT, WrapT, EmptyT > & | operator= (const tCubCell< CoordT, WrapT, EmptyT > &s) |
The assignment operator. More... | |
~tCubCell () | |
The destructor. More... | |
int | spaceDim () const |
Returns the dimension of the embedding space. More... | |
int | dim () const |
Returns the dimension of the elementary cube. More... | |
const CoordT | left (int n) const |
Returns the n-th left coordinate of the elementary cube. More... | |
const CoordT | right (int n) const |
Returns the n-th right coordinate of the elementary cube. More... | |
int | boundaryLength () const |
Returns the length of the boundary of the elementary cube. More... | |
int | boundaryCoef (int n) const |
Returns the n-th coefficient in the boundary of the cube. More... | |
int | diagonalLength () const |
Returns the number of terms in the Alexander-Whitneney diagonal. More... | |
int_t | hashkey1 () const |
Returns hashing key no. 1, based on the internal data. More... | |
int_t | hashkey2 () const |
Return shashing key no. 2, based on the internal data. More... | |
bool | operator== (const tCubCell< CoordT, WrapT, EmptyT > &s) const |
Returns true if and only if the cubes are the same. More... | |
void | swap (tCubCell< CoordT, WrapT, EmptyT > &s) |
Swaps the data between two cubical cells. More... | |
Protected Attributes | |
int_t | n1 |
The number that defines the left corner of the elementary cube. More... | |
int_t | n2 |
The number that defines the right corner of the elementary cube. More... | |
An elementary cubical cell with vertex coordinates of integer type.
Note that unless using the most standard built-in integers, the vertex coordinate integer type must have hash key functions (hashkey1 and hashkey2, see e.g. those in chomp/struct/hashsets.h). The wrapping class must provide a static function "wrap" for wrapping the coordinates, separately at each dimension. The empty cell existence decision class must provide a static function "exists" that returns true if the empty cell must be taken into consideration or false otherwise.
|
inline |
The default constructor of an empty cube.
Definition at line 156 of file cubcell.h.
Referenced by tCubCell< CoordT, WrapT, EmptyT >::tCubCell().
|
inline |
The constructor of a full cube from an array of coordinates.
Definition at line 163 of file cubcell.h.
References tCubCell< CoordT, WrapT, EmptyT >::n1, and tCubCell< CoordT, WrapT, EmptyT >::n2.
|
inline |
The constructor of a full cube from two arrays of coordinates.
Definition at line 195 of file cubcell.h.
References tCubCell< CoordT, WrapT, EmptyT >::n1, tCubCell< CoordT, WrapT, EmptyT >::n2, and tCubCell< CoordT, WrapT, EmptyT >::tCubCell().
|
inline |
The copy constructor.
Definition at line 235 of file cubcell.h.
References tCubCell< CoordT, WrapT, EmptyT >::tCubCell().
|
inline |
The constructor of the n-th boundary cube.
Definition at line 243 of file cubcell.h.
References tCubCell< CoordT, WrapT, EmptyT >::dim(), tCubCell< CoordT, WrapT, EmptyT >::left(), tCubCell< CoordT, WrapT, EmptyT >::n1, tCubCell< CoordT, WrapT, EmptyT >::n2, tCubCell< CoordT, WrapT, EmptyT >::right(), and tCubCell< CoordT, WrapT, EmptyT >::spaceDim().
|
inline |
The constructor of the n-th component of the Alexander-Whitney diagonal, either the left one (if side = 0), or the right one (if side = 1).
Definition at line 316 of file cubcell.h.
References tCubCell< CoordT, WrapT, EmptyT >::dim(), tCubCell< CoordT, WrapT, EmptyT >::left(), tCubCell< CoordT, WrapT, EmptyT >::n1, tCubCell< CoordT, WrapT, EmptyT >::n2, tCubCell< CoordT, WrapT, EmptyT >::right(), and tCubCell< CoordT, WrapT, EmptyT >::spaceDim().
|
inline |
Returns the n-th coefficient in the boundary of the cube.
Definition at line 519 of file cubcell.h.
References tCubCell< CoordT, WrapT, EmptyT >::dim().
|
inline |
Returns the length of the boundary of the elementary cube.
Definition at line 509 of file cubcell.h.
References tCubCell< CoordT, WrapT, EmptyT >::dim().
|
inline |
Returns the number of terms in the Alexander-Whitneney diagonal.
Definition at line 530 of file cubcell.h.
References tCubCell< CoordT, WrapT, EmptyT >::dim().
|
inline |
Returns the dimension of the elementary cube.
Definition at line 487 of file cubcell.h.
References tCubCell< CoordT, WrapT, EmptyT >::n1, and tCubCell< CoordT, WrapT, EmptyT >::n2.
Referenced by tCubCell< CoordT, WrapT, EmptyT >::boundaryCoef(), tCubCell< CoordT, WrapT, EmptyT >::boundaryLength(), tCubCell< CoordT, WrapT, EmptyT >::diagonalLength(), operator<<(), and tCubCell< CoordT, WrapT, EmptyT >::tCubCell().
|
inline |
Returns hashing key no. 1, based on the internal data.
Definition at line 538 of file cubcell.h.
References tCubCell< CoordT, WrapT, EmptyT >::n1, and tCubCell< CoordT, WrapT, EmptyT >::n2.
Referenced by hashkey1().
|
inline |
Return shashing key no. 2, based on the internal data.
Definition at line 545 of file cubcell.h.
References tCubCell< CoordT, WrapT, EmptyT >::n1, and tCubCell< CoordT, WrapT, EmptyT >::n2.
Referenced by hashkey2().
|
inline |
Returns the n-th left coordinate of the elementary cube.
Definition at line 495 of file cubcell.h.
References tCubCell< CoordT, WrapT, EmptyT >::n1, and tCubCell< CoordT, WrapT, EmptyT >::spaceDim().
Referenced by operator<<(), operator>>(), and tCubCell< CoordT, WrapT, EmptyT >::tCubCell().
|
inline |
The assignment operator.
Definition at line 467 of file cubcell.h.
References tCubCell< CoordT, WrapT, EmptyT >::n1, and tCubCell< CoordT, WrapT, EmptyT >::n2.
|
inline |
Returns true if and only if the cubes are the same.
Definition at line 553 of file cubcell.h.
References tCubCell< CoordT, WrapT, EmptyT >::n1, tCubCell< CoordT, WrapT, EmptyT >::n2, and tCubCell< CoordT, WrapT, EmptyT >::swap().
|
inline |
Returns the n-th right coordinate of the elementary cube.
Definition at line 502 of file cubcell.h.
References tCubCell< CoordT, WrapT, EmptyT >::n2, and tCubCell< CoordT, WrapT, EmptyT >::spaceDim().
Referenced by operator<<(), operator>>(), and tCubCell< CoordT, WrapT, EmptyT >::tCubCell().
|
inline |
Returns the dimension of the embedding space.
Definition at line 481 of file cubcell.h.
References tCubCell< CoordT, WrapT, EmptyT >::n1.
Referenced by tCubCell< CoordT, WrapT, EmptyT >::left(), operator<<(), operator>>(), tCubCell< CoordT, WrapT, EmptyT >::right(), and tCubCell< CoordT, WrapT, EmptyT >::tCubCell().
|
inline |
Swaps the data between two cubical cells.
Definition at line 560 of file cubcell.h.
References tCubCell< CoordT, WrapT, EmptyT >::n1, and tCubCell< CoordT, WrapT, EmptyT >::n2.
Referenced by tCubCell< CoordT, WrapT, EmptyT >::operator==().
|
protected |
The number that defines the left corner of the elementary cube.
The dimension of the embedding space is stored in high bits of this number. As an exception, the empty cell has this number set to 0.
Definition at line 143 of file cubcell.h.
Referenced by tCubCell< CoordT, WrapT, EmptyT >::dim(), tCubCell< CoordT, WrapT, EmptyT >::hashkey1(), tCubCell< CoordT, WrapT, EmptyT >::hashkey2(), tCubCell< CoordT, WrapT, EmptyT >::left(), tCubCell< CoordT, WrapT, EmptyT >::operator=(), tCubCell< CoordT, WrapT, EmptyT >::operator==(), tCubCell< CoordT, WrapT, EmptyT >::spaceDim(), tCubCell< CoordT, WrapT, EmptyT >::swap(), and tCubCell< CoordT, WrapT, EmptyT >::tCubCell().
|
protected |
The number that defines the right corner of the elementary cube.
The dimension of the cubical cell is stored in the high bits of this number. As an exception, the empty cell has this number set to 0.
Definition at line 149 of file cubcell.h.
Referenced by tCubCell< CoordT, WrapT, EmptyT >::dim(), tCubCell< CoordT, WrapT, EmptyT >::hashkey1(), tCubCell< CoordT, WrapT, EmptyT >::hashkey2(), tCubCell< CoordT, WrapT, EmptyT >::operator=(), tCubCell< CoordT, WrapT, EmptyT >::operator==(), tCubCell< CoordT, WrapT, EmptyT >::right(), tCubCell< CoordT, WrapT, EmptyT >::swap(), and tCubCell< CoordT, WrapT, EmptyT >::tCubCell().