28 #ifndef _CHAINCON_COMBCHAIN_H_    29 #define _CHAINCON_COMBCHAIN_H_    37 #include "chomp/system/config.h"    38 #include "chomp/struct/hashsets.h"    48 template <
class CellT>
    68         const CellT &
getCell (int_t n) 
const;
    72         int_t 
position (
const CellT &c) 
const;
    75         void add (
const CellT &c);
    91         chomp::homology::hashedset<CellT> 
cells;
    97 template <
class CellT>
   104 template <
class CellT>
   110 template <
class CellT>
   116 template <
class CellT>
   122 template <
class CellT>
   125         return cells. getnumber (c);
   128 template <
class CellT>
   131         int_t n = 
cells. getnumber (c);
   135                 cells. removenum (n);
   139 template <
class CellT>
   151                 for (int_t i = 0; i < 
size; ++ i)
   157 template <
class CellT>
   163 template <
class CellT>
   171         for (int_t i = 0; i < 
size; ++ i)
   179 template <
class CellT>
   189 template <
class CellT>
   190 std::ostream &operator << (std::ostream &out, const tCombChain<CellT> &c)
   197                 for (int_t i = 0; i < 
size; ++ i)
   208 template <
class CellT>
   211         throw "Operator >> not implemented for tCombChain.";
   217 template <
class CellT>
   227 #endif // _CHAINCON_COMBCHAIN_H_ tCombChain< CellT > & negate()
Negates all the coefficients in the chain. 
 
An element of the ring Z_2. 
 
tCombChain< CellT > operator+(const tCombChain< CellT > &a, const tCombChain< CellT > &b)
 
void swap(tCombChain< CellT > &ch)
Swaps the data with another chain. 
 
bool operator==(const tCombChain< CellT > &ch) const
Compares if the two chains are equal. 
 
const CellT & getCell(int_t n) const
Returns the n-th element of the combinatorial chain. 
 
tZ2 CoefType
The type of coefficients in the chain. 
 
int_t size() const
Returns the number of elements in the combinatorial chain. 
 
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. 
 
void add(const CellT &c)
Adds a given cell to the combinatorial chain. 
 
Elements of the ring Z_2. 
 
std::istream & operator>>(std::istream &in, tCombChain< CellT > &c)
Reads a combinatorial chain from an input stream. 
 
chomp::homology::hashedset< CellT > cells
The set of elements in the combinatorial chain. 
 
tCombChain()
The default constructor of an empty combinatorial chain. 
 
tCombChain< CellT > & operator+=(const tCombChain< CellT > &ch)
Adds a given chain to the combinatorial chain. 
 
CellT CellType
The type of cells in the combinatorial chain. 
 
bool empty() const
Returns true if and only if the chain is zero (empty set).