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

A combinatorial chain. More...

#include <combchain.h>

Public Types

typedef CellT CellType
 The type of cells in the combinatorial chain. More...
 
typedef tZ2 CoefType
 The type of coefficients in the chain. More...
 

Public Member Functions

 tCombChain ()
 The default constructor of an empty combinatorial chain. More...
 
int_t size () const
 Returns the number of elements in the combinatorial chain. More...
 
bool empty () const
 Returns true if and only if the chain is zero (empty set). More...
 
const CellT & getCell (int_t n) const
 Returns the n-th element of the combinatorial chain. More...
 
int_t position (const CellT &c) const
 Returns the position of the given cell in the chain or -1 if the cell is not there. More...
 
void add (const CellT &c)
 Adds a given cell to the combinatorial chain. More...
 
tCombChain< CellT > & operator+= (const tCombChain< CellT > &ch)
 Adds a given chain to the combinatorial chain. More...
 
tCombChain< CellT > & negate ()
 Negates all the coefficients in the chain. More...
 
bool operator== (const tCombChain< CellT > &ch) const
 Compares if the two chains are equal. More...
 
void swap (tCombChain< CellT > &ch)
 Swaps the data with another chain. More...
 

Private Attributes

chomp::homology::hashedset< CellT > cells
 The set of elements in the combinatorial chain. More...
 

Detailed Description

template<class CellT>
class tCombChain< CellT >

A combinatorial chain.

This is in fact a finite set of cells. It corresponds to chains with coefficients in F_2 (a.k.a. Z_2).

Definition at line 49 of file combchain.h.

Member Typedef Documentation

◆ CellType

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

The type of cells in the combinatorial chain.

Definition at line 53 of file combchain.h.

◆ CoefType

template<class CellT>
typedef tZ2 tCombChain< CellT >::CoefType

The type of coefficients in the chain.

Definition at line 56 of file combchain.h.

Constructor & Destructor Documentation

◆ tCombChain()

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

The default constructor of an empty combinatorial chain.

Definition at line 98 of file combchain.h.

Member Function Documentation

◆ add()

template<class CellT>
void tCombChain< CellT >::add ( const CellT &  c)
inline

Adds a given cell to the combinatorial chain.

Definition at line 129 of file combchain.h.

Referenced by tCombChain< tPair< Cell1T, Cell2T > >::add(), and tCombChain< tPair< Cell1T, Cell2T > >::operator+=().

◆ empty()

template<class CellT >
bool tCombChain< CellT >::empty ( ) const
inline

Returns true if and only if the chain is zero (empty set).

Definition at line 111 of file combchain.h.

Referenced by tCombChain< tPair< Cell1T, Cell2T > >::empty(), and tCombChain< tPair< Cell1T, Cell2T > >::operator+=().

◆ getCell()

template<class CellT >
const CellT & tCombChain< CellT >::getCell ( int_t  n) const
inline

Returns the n-th element of the combinatorial chain.

Definition at line 117 of file combchain.h.

Referenced by tCombChain< tPair< Cell1T, Cell2T > >::operator+=(), and operator<<().

◆ negate()

template<class CellT >
tCombChain< CellT > & tCombChain< CellT >::negate ( )
inline

Negates all the coefficients in the chain.

Definition at line 158 of file combchain.h.

◆ operator+=()

template<class CellT>
tCombChain< CellT > & tCombChain< CellT >::operator+= ( const tCombChain< CellT > &  ch)
inline

Adds a given chain to the combinatorial chain.

Definition at line 141 of file combchain.h.

◆ operator==()

template<class CellT>
bool tCombChain< CellT >::operator== ( const tCombChain< CellT > &  ch) const
inline

Compares if the two chains are equal.

Definition at line 164 of file combchain.h.

◆ position()

template<class CellT>
int_t tCombChain< CellT >::position ( const CellT &  c) const
inline

Returns the position of the given cell in the chain or -1 if the cell is not there.

Definition at line 123 of file combchain.h.

◆ size()

template<class CellT >
int_t tCombChain< CellT >::size ( ) const
inline

Returns the number of elements in the combinatorial chain.

Definition at line 105 of file combchain.h.

Referenced by tCombChain< tPair< Cell1T, Cell2T > >::operator+=(), operator<<(), tCombChain< tPair< Cell1T, Cell2T > >::operator==(), and tCombChain< tPair< Cell1T, Cell2T > >::size().

◆ swap()

template<class CellT>
void tCombChain< CellT >::swap ( tCombChain< CellT > &  ch)
inline

Swaps the data with another chain.

Definition at line 180 of file combchain.h.

Referenced by tCombChain< tPair< Cell1T, Cell2T > >::operator+=(), and tCombChain< tPair< Cell1T, Cell2T > >::swap().

Member Data Documentation

◆ cells

template<class CellT>
chomp::homology::hashedset<CellT> tCombChain< CellT >::cells
private

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