The ChainCon Software (Release 0.03)
Public Types | Public Member Functions | Private Attributes | List of all members
tProdCell< CellT > Class Template Reference

A Cartesian product of simplicial cells as a simplicial cell. More...

#include <prodcell.h>

Public Types

typedef CellT CellType
 The type of the cells whose product is stored here. More...
 
typedef CellT::EmptyType EmptyType
 The type of the empty cell existence decision class. More...
 

Public Member Functions

 tProdCell ()
 The default constructor of an undefined product cell. More...
 
 tProdCell (const CellT &c)
 The constructor of a product cell from a simplicial cell. More...
 
 tProdCell (const tProdCell< CellT > &s1, const tProdCell< CellT > &s2)
 The constructor of a product of two product cells. More...
 
 tProdCell (const tProdCell< CellT > &s)
 The copy constructor. More...
 
 tProdCell (const tProdCell< CellT > &s, int n)
 The constructor of the n-th face of a cell (if n >= 0) or the k-th degeneracy operator (if n = -1 - k < 0). More...
 
tProdCell< CellT > & operator= (const tProdCell< CellT > &s)
 The assignment operator. More...
 
 ~tProdCell ()
 The destructor. More...
 
bool operator== (const tProdCell< CellT > &s) const
 Checks if the two cells are equal. More...
 
void swap (tProdCell< CellT > &s)
 Swaps the data between two cells. More...
 
int dim () const
 Returns the dimension of the cell. More...
 
int degenerate () const
 Checks if the product cell is degenerate, that is, if its (i-1)st face equals ith face. More...
 
bool defined () const
 Checks if the cell is defined. More...
 
bool product () const
 Checks if the cell is really a product of two other cells. More...
 
const tProdCellgetLeft () const
 Returns the left-hand side part of the product. More...
 
const tProdCellgetRight () const
 Returns the right-hand side part of the product. More...
 
const CellT & getCell () const
 Returns the actual cell in case this is not a product. More...
 
int boundaryLength () const
 Returns the length of the boundary of the simplicial product, which equals the dimension of the cell + 1. More...
 
int boundaryCoef (int n) const
 Returns the n-th coefficient in the boundary of the simplicial product, which is (-1)^n. More...
 

Private Attributes

int dimension
 The dimension of the cell. More...
 
tProdCell< CellT > * left
 A pointer to the left-hand side part of the product. More...
 
tProdCell< CellT > * right
 A pointer to the right-hand side part of the product. More...
 
CellT * cell
 A pointer to the actual cell if this is not a product. More...
 

Detailed Description

template<class CellT>
class tProdCell< CellT >

A Cartesian product of simplicial cells as a simplicial cell.

Definition at line 48 of file prodcell.h.

Member Typedef Documentation

◆ CellType

template<class CellT>
typedef CellT tProdCell< CellT >::CellType

The type of the cells whose product is stored here.

Definition at line 52 of file prodcell.h.

◆ EmptyType

template<class CellT>
typedef CellT::EmptyType tProdCell< CellT >::EmptyType

The type of the empty cell existence decision class.

Definition at line 55 of file prodcell.h.

Constructor & Destructor Documentation

◆ tProdCell() [1/5]

template<class CellT >
tProdCell< CellT >::tProdCell ( )
inline

The default constructor of an undefined product cell.

Definition at line 138 of file prodcell.h.

◆ tProdCell() [2/5]

template<class CellT >
tProdCell< CellT >::tProdCell ( const CellT &  c)
inline

The constructor of a product cell from a simplicial cell.

Definition at line 145 of file prodcell.h.

◆ tProdCell() [3/5]

template<class CellT >
tProdCell< CellT >::tProdCell ( const tProdCell< CellT > &  s1,
const tProdCell< CellT > &  s2 
)
inline

The constructor of a product of two product cells.

Definition at line 152 of file prodcell.h.

References tProdCell< CellT >::dimension.

◆ tProdCell() [4/5]

template<class CellT >
tProdCell< CellT >::tProdCell ( const tProdCell< CellT > &  s)
inline

The copy constructor.

Definition at line 166 of file prodcell.h.

◆ tProdCell() [5/5]

template<class CellT >
tProdCell< CellT >::tProdCell ( const tProdCell< CellT > &  s,
int  n 
)
inline

The constructor of the n-th face of a cell (if n >= 0) or the k-th degeneracy operator (if n = -1 - k < 0).

Definition at line 176 of file prodcell.h.

References tProdCell< CellT >::cell, tProdCell< CellT >::dim(), tProdCell< CellT >::dimension, and tProdCell< CellT >::left.

◆ ~tProdCell()

template<class CellT >
tProdCell< CellT >::~tProdCell ( )
inline

The destructor.

Definition at line 224 of file prodcell.h.

References tProdCell< CellT >::cell, tProdCell< CellT >::left, and tProdCell< CellT >::right.

Member Function Documentation

◆ boundaryCoef()

template<class CellT >
int tProdCell< CellT >::boundaryCoef ( int  n) const
inline

Returns the n-th coefficient in the boundary of the simplicial product, which is (-1)^n.

Definition at line 331 of file prodcell.h.

◆ boundaryLength()

template<class CellT >
int tProdCell< CellT >::boundaryLength ( ) const
inline

Returns the length of the boundary of the simplicial product, which equals the dimension of the cell + 1.

Definition at line 325 of file prodcell.h.

References tProdCell< CellT >::dimension.

◆ defined()

template<class CellT >
bool tProdCell< CellT >::defined ( ) const
inline

Checks if the cell is defined.

Definition at line 289 of file prodcell.h.

References tProdCell< CellT >::cell, and tProdCell< CellT >::left.

Referenced by hashkey1(), hashkey2(), and operator<<().

◆ degenerate()

template<class CellT >
int tProdCell< CellT >::degenerate ( ) const
inline

Checks if the product cell is degenerate, that is, if its (i-1)st face equals ith face.

Returns the first such number i > 0 if this is the case. Returns 0 if the cell is not degenerate. Note that this verification may be a bit time-consuming, because it involves creation of all these faces.

Definition at line 273 of file prodcell.h.

References tProdCell< CellT >::dimension, and tProdCell< CellT >::swap().

◆ dim()

template<class CellT >
int tProdCell< CellT >::dim ( ) const
inline

Returns the dimension of the cell.

Definition at line 267 of file prodcell.h.

References tProdCell< CellT >::dimension.

Referenced by tProdCell< CellT >::tProdCell().

◆ getCell()

template<class CellT >
const CellT & tProdCell< CellT >::getCell ( ) const
inline

Returns the actual cell in case this is not a product.

Definition at line 317 of file prodcell.h.

References tProdCell< CellT >::cell.

Referenced by hashkey1(), hashkey2(), and operator<<().

◆ getLeft()

template<class CellT >
const tProdCell< CellT > & tProdCell< CellT >::getLeft ( ) const
inline

Returns the left-hand side part of the product.

Definition at line 301 of file prodcell.h.

References tProdCell< CellT >::left.

Referenced by hashkey1(), hashkey2(), and operator<<().

◆ getRight()

template<class CellT >
const tProdCell< CellT > & tProdCell< CellT >::getRight ( ) const
inline

Returns the right-hand side part of the product.

Definition at line 309 of file prodcell.h.

References tProdCell< CellT >::right.

Referenced by hashkey1(), hashkey2(), and operator<<().

◆ operator=()

template<class CellT >
tProdCell< CellT > & tProdCell< CellT >::operator= ( const tProdCell< CellT > &  s)
inline

The assignment operator.

Definition at line 191 of file prodcell.h.

References tProdCell< CellT >::cell, tProdCell< CellT >::dimension, tProdCell< CellT >::left, and tProdCell< CellT >::right.

◆ operator==()

template<class CellT >
bool tProdCell< CellT >::operator== ( const tProdCell< CellT > &  s) const
inline

Checks if the two cells are equal.

Definition at line 237 of file prodcell.h.

References tProdCell< CellT >::cell, tProdCell< CellT >::dimension, tProdCell< CellT >::left, and tProdCell< CellT >::right.

◆ product()

template<class CellT >
bool tProdCell< CellT >::product ( ) const
inline

Checks if the cell is really a product of two other cells.

Returns true if yes, or false otherwise.

Definition at line 295 of file prodcell.h.

References tProdCell< CellT >::left.

Referenced by hashkey1(), hashkey2(), and operator<<().

◆ swap()

template<class CellT >
void tProdCell< CellT >::swap ( tProdCell< CellT > &  s)
inline

Swaps the data between two cells.

Definition at line 257 of file prodcell.h.

References tProdCell< CellT >::cell, tProdCell< CellT >::dimension, tProdCell< CellT >::left, and tProdCell< CellT >::right.

Referenced by tProdCell< CellT >::degenerate().

Member Data Documentation

◆ cell

template<class CellT>
CellT* tProdCell< CellT >::cell
private

◆ dimension

template<class CellT>
int tProdCell< CellT >::dimension
private

◆ left

template<class CellT>
tProdCell<CellT>* tProdCell< CellT >::left
private

◆ right

template<class CellT>
tProdCell<CellT>* tProdCell< CellT >::right
private

A pointer to the right-hand side part of the product.

Definition at line 128 of file prodcell.h.

Referenced by tProdCell< CellT >::getRight(), tProdCell< CellT >::operator=(), tProdCell< CellT >::operator==(), tProdCell< CellT >::swap(), and tProdCell< CellT >::~tProdCell().


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