The ChainCon Software (Release 0.03)
Public Types | Public Member Functions | Static Public Member Functions | Private Attributes | Static Private Attributes | List of all members
tAlgCell< IdT, DimT, CoefT > Class Template Reference

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...
 

Detailed Description

template<class IdT, class DimT, class CoefT>
class tAlgCell< IdT, DimT, CoefT >

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.

Definition at line 54 of file algcell.h.

Member Typedef Documentation

◆ CoefType

template<class IdT, class DimT, class CoefT>
typedef CoefT tAlgCell< IdT, DimT, CoefT >::CoefType

The type of coefficients in the chain.

Definition at line 64 of file algcell.h.

◆ DimType

template<class IdT, class DimT, class CoefT>
typedef DimT tAlgCell< IdT, DimT, CoefT >::DimType

The type of integer used to store the dimension of the cell.

Definition at line 61 of file algcell.h.

◆ IdType

template<class IdT, class DimT, class CoefT>
typedef IdT tAlgCell< IdT, DimT, CoefT >::IdType

The type of a cell identifier.

Definition at line 58 of file algcell.h.

Constructor & Destructor Documentation

◆ tAlgCell() [1/4]

template<class IdT , class DimT , class CoefT >
tAlgCell< IdT, DimT, CoefT >::tAlgCell ( )
inline

The default constructor of an empty cell (id 0).

Definition at line 160 of file algcell.h.

Referenced by tAlgCell< IdT, DimT, CoefT >::tAlgCell().

◆ tAlgCell() [2/4]

template<class IdT , class DimT , class CoefT >
tAlgCell< IdT, DimT, CoefT >::tAlgCell ( const IdT &  identifier)
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().

◆ tAlgCell() [3/4]

template<class IdT , class DimT , class CoefT >
tAlgCell< IdT, DimT, CoefT >::tAlgCell ( const tAlgCell< IdT, DimT, CoefT > &  c)
inline

The copy constructor.

Definition at line 174 of file algcell.h.

References tAlgCell< IdT, DimT, CoefT >::tAlgCell().

◆ tAlgCell() [4/4]

template<class IdT , class DimT , class CoefT >
tAlgCell< IdT, DimT, CoefT >::tAlgCell ( const tAlgCell< IdT, DimT, CoefT > &  c,
int_t  n 
)
inline

The constructor of the n-th boundary cell.

Definition at line 182 of file algcell.h.

◆ ~tAlgCell()

template<class IdT , class DimT , class CoefT >
tAlgCell< IdT, DimT, CoefT >::~tAlgCell ( )
inline

The destructor.

Definition at line 197 of file algcell.h.

Member Function Documentation

◆ boundaryCoef()

template<class IdT , class DimT , class CoefT >
const CoefT & tAlgCell< IdT, DimT, CoefT >::boundaryCoef ( int_t  n) const
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.

◆ boundaryLength()

template<class IdT , class DimT , class CoefT >
int_t tAlgCell< IdT, DimT, CoefT >::boundaryLength ( ) const
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.

◆ dim()

template<class IdT , class DimT , class CoefT >
const DimT & tAlgCell< IdT, DimT, CoefT >::dim ( ) const
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>>().

◆ forget()

template<class IdT , class DimT , class CoefT >
void tAlgCell< IdT, DimT, CoefT >::forget ( )
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.

◆ getId()

template<class IdT , class DimT , class CoefT >
const IdT & tAlgCell< IdT, DimT, CoefT >::getId ( ) const
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<<().

◆ newId()

template<class IdT , class DimT , class CoefT >
IdT tAlgCell< IdT, DimT, CoefT >::newId ( )
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.

◆ operator=()

template<class IdT , class DimT , class CoefT >
tAlgCell< IdT, DimT, CoefT > & tAlgCell< IdT, DimT, CoefT >::operator= ( const tAlgCell< IdT, DimT, CoefT > &  s)
inline

The assignment operator.

Definition at line 190 of file algcell.h.

References tAlgCell< IdT, DimT, CoefT >::id.

◆ operator==()

template<class IdT , class DimT , class CoefT >
bool tAlgCell< IdT, DimT, CoefT >::operator== ( const tAlgCell< IdT, DimT, CoefT > &  s) const
inline

The equality operator.

Definition at line 233 of file algcell.h.

◆ setBoundary()

template<class IdT , class DimT , class CoefT >
void tAlgCell< IdT, DimT, CoefT >::setBoundary ( const IdT &  identifier,
const tChain< tAlgCell< IdT, DimT, CoefT >, CoefT > &  boundary 
)
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().

◆ setDimension()

template<class IdT , class DimT , class CoefT >
void tAlgCell< IdT, DimT, CoefT >::setDimension ( const IdT &  identifier,
const DimT &  dimension 
)
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>>().

◆ swap()

template<class IdT , class DimT , class CoefT >
void tAlgCell< IdT, DimT, CoefT >::swap ( tAlgCell< IdT, DimT, CoefT > &  s)
inline

Swaps the data with another cell.

Definition at line 239 of file algcell.h.

Member Data Documentation

◆ boundaries

template<class IdT, class DimT, class CoefT>
chomp::homology::multitable< tChain< tAlgCell< IdT, DimT, CoefT >, CoefT > > tAlgCell< IdT, DimT, CoefT >::boundaries
staticprivate

◆ dim0initialized

template<class IdT, class DimT, class CoefT>
bool tAlgCell< IdT, DimT, CoefT >::dim0initialized
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().

◆ dimensions

template<class IdT, class DimT, class CoefT>
chomp::homology::multitable< DimT > tAlgCell< IdT, DimT, CoefT >::dimensions
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().

◆ id

template<class IdT, class DimT, class CoefT>
IdT tAlgCell< IdT, DimT, CoefT >::id
private

◆ maxUsedId

template<class IdT, class DimT, class CoefT>
IdT tAlgCell< IdT, DimT, CoefT >::maxUsedId
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().


The documentation for this class was generated from the following file: