The ChainCon Software (Release 0.03)
|
An abstract algebraic cell, characterized by a unique identifier, dimension, and a formula for its boundary. More...
#include <algcell.h>
Public Types | |
typedef IdT | IdType |
The type of a cell identifier. More... | |
typedef DimT | DimType |
The type of integer used to store the dimension of the cell. More... | |
typedef CoefT | CoefType |
The type of coefficients in the chain. More... | |
Public Member Functions | |
tAlgCell () | |
The default constructor of an empty cell (id 0). More... | |
tAlgCell (const IdT &identifier) | |
The constructor of a cell with a given identifier. More... | |
tAlgCell (const tAlgCell< IdT, DimT, CoefT > &c) | |
The copy constructor. More... | |
tAlgCell (const tAlgCell< IdT, DimT, CoefT > &c, int_t n) | |
The constructor of the n-th boundary cell. More... | |
tAlgCell< IdT, DimT, CoefT > & | operator= (const tAlgCell< IdT, DimT, CoefT > &s) |
The assignment operator. More... | |
~tAlgCell () | |
The destructor. More... | |
const DimT & | dim () const |
Returns the dimension of the cell. More... | |
const IdT & | getId () const |
Returns the identifier of the cell. More... | |
int_t | boundaryLength () const |
Returns the length of the boundary of the elementary cube. More... | |
const CoefT & | boundaryCoef (int_t n) const |
Returns the n-th coefficient in the boundary of the cube. More... | |
bool | operator== (const tAlgCell< IdT, DimT, CoefT > &s) const |
The equality operator. More... | |
void | swap (tAlgCell< IdT, DimT, CoefT > &s) |
Swaps the data with another cell. More... | |
Static Public Member Functions | |
static IdT | newId () |
Returns the next available identifier to be used for cells. More... | |
static void | setDimension (const IdT &identifier, const DimT &dimension) |
Sets the dimension of the cell with the given identifier. More... | |
static void | setBoundary (const IdT &identifier, const tChain< tAlgCell< IdT, DimT, CoefT >, CoefT > &boundary) |
Sets the boundary of the cell with the given identifier. More... | |
static void | forget () |
Forgets all the boundaries and dimensions of cells and resets the identifier counter. More... | |
Private Attributes | |
IdT | id |
The identifier of the cell. More... | |
Static Private Attributes | |
static IdT | maxUsedId |
The next free identifier for a new cell. More... | |
static chomp::homology::multitable< DimT > | dimensions |
A global array of dimensions of the cells. More... | |
static bool | dim0initialized |
A global variable remembering if the dimension of cell 0 was already set to -1. More... | |
static chomp::homology::multitable< tChain< tAlgCell< IdT, DimT, CoefT >, CoefT > > | boundaries |
A global array of boundaries of the cells. More... | |
An abstract algebraic cell, characterized by a unique identifier, dimension, and a formula for its boundary.
The identifier type must be convertible to an integer, since it is used for indexing arrays of certain types.
The default constructor of an empty cell (id 0).
Definition at line 160 of file algcell.h.
Referenced by tAlgCell< IdT, DimT, CoefT >::tAlgCell().
|
inlineexplicit |
The constructor of a cell with a given identifier.
Note that its dimension (if >= 0) and boundary (if nonzero) must be already set earlier (for this id) or must be set later (using methods available for this cell).
Definition at line 166 of file algcell.h.
References tAlgCell< IdT, DimT, CoefT >::tAlgCell().
|
inline |
The copy constructor.
Definition at line 174 of file algcell.h.
References tAlgCell< IdT, DimT, CoefT >::tAlgCell().
|
inline |
Returns the n-th coefficient in the boundary of the cube.
Definition at line 226 of file algcell.h.
References tAlgCell< IdT, DimT, CoefT >::boundaries, and tAlgCell< IdT, DimT, CoefT >::id.
|
inline |
Returns the length of the boundary of the elementary cube.
Definition at line 220 of file algcell.h.
References tAlgCell< IdT, DimT, CoefT >::boundaries, and tAlgCell< IdT, DimT, CoefT >::id.
|
inline |
Returns the dimension of the cell.
Definition at line 203 of file algcell.h.
References tAlgCell< IdT, DimT, CoefT >::dim0initialized, tAlgCell< IdT, DimT, CoefT >::dimensions, and tAlgCell< IdT, DimT, CoefT >::id.
Referenced by operator>>().
|
inlinestatic |
Forgets all the boundaries and dimensions of cells and resets the identifier counter.
Note that after this 'reset' all the cells that exist are not valid anymore.
Definition at line 268 of file algcell.h.
References tAlgCell< IdT, DimT, CoefT >::boundaries, tAlgCell< IdT, DimT, CoefT >::dim0initialized, tAlgCell< IdT, DimT, CoefT >::dimensions, and tAlgCell< IdT, DimT, CoefT >::maxUsedId.
|
inline |
Returns the identifier of the cell.
Definition at line 214 of file algcell.h.
References tAlgCell< IdT, DimT, CoefT >::id.
Referenced by hashkey1(), hashkey2(), and operator<<().
|
inlinestatic |
Returns the next available identifier to be used for cells.
Definition at line 246 of file algcell.h.
References tAlgCell< IdT, DimT, CoefT >::maxUsedId.
|
inline |
The assignment operator.
Definition at line 190 of file algcell.h.
References tAlgCell< IdT, DimT, CoefT >::id.
|
inlinestatic |
Sets the boundary of the cell with the given identifier.
Definition at line 260 of file algcell.h.
References tAlgCell< IdT, DimT, CoefT >::boundaries, and boundary().
|
inlinestatic |
Sets the dimension of the cell with the given identifier.
Definition at line 252 of file algcell.h.
References tAlgCell< IdT, DimT, CoefT >::dimensions.
Referenced by operator>>().
|
staticprivate |
A global array of boundaries of the cells.
Definition at line 138 of file algcell.h.
Referenced by tAlgCell< IdT, DimT, CoefT >::boundaryCoef(), tAlgCell< IdT, DimT, CoefT >::boundaryLength(), tAlgCell< IdT, DimT, CoefT >::forget(), and tAlgCell< IdT, DimT, CoefT >::setBoundary().
|
staticprivate |
A global variable remembering if the dimension of cell 0 was already set to -1.
Definition at line 134 of file algcell.h.
Referenced by tAlgCell< IdT, DimT, CoefT >::dim(), and tAlgCell< IdT, DimT, CoefT >::forget().
|
staticprivate |
A global array of dimensions of the cells.
Definition at line 130 of file algcell.h.
Referenced by tAlgCell< IdT, DimT, CoefT >::dim(), tAlgCell< IdT, DimT, CoefT >::forget(), and tAlgCell< IdT, DimT, CoefT >::setDimension().
|
private |
The identifier of the cell.
Definition at line 124 of file algcell.h.
Referenced by tAlgCell< IdT, DimT, CoefT >::boundaryCoef(), tAlgCell< IdT, DimT, CoefT >::boundaryLength(), tAlgCell< IdT, DimT, CoefT >::dim(), tAlgCell< IdT, DimT, CoefT >::getId(), tAlgCell< IdT, DimT, CoefT >::operator=(), and operator>>().
|
staticprivate |
The next free identifier for a new cell.
Definition at line 127 of file algcell.h.
Referenced by tAlgCell< IdT, DimT, CoefT >::forget(), and tAlgCell< IdT, DimT, CoefT >::newId().