The ChainCon Software (Release 0.03)
|
A combinatorial linear map. More...
#include <comblinmap.h>
Public Types | |
typedef CellDomT | CellDomType |
The type of cells in the domain of the combinatorial linear map. More... | |
typedef CellImgT | CellImgType |
The type of cells in the images of the combinatorial linear map. More... | |
typedef tZ2 | CoefType |
The type of coefficients in the chain. More... | |
typedef tCombChain< CellDomT > | ChainDomType |
The type of the corresponding domain chain. More... | |
typedef tCombChain< CellImgT > | ChainImgType |
The type of the corresponding image chain. More... | |
typedef tCombTensor< CellDomT, CellDomT > | TensorDomType |
The type of the corresponding domain chain. More... | |
typedef tCombTensor< CellImgT, CellImgT > | TensorImgType |
The type of the corresponding image chain. More... | |
Public Member Functions | |
tCombLinMap () | |
The default constructor. More... | |
int_t | add (const CellDomT &c) |
Adds a cell to the domain of the map, with zero image, and returns its number. More... | |
void | add (const CellDomT &c, const CellImgT &d) |
Adds a cell to the image of the given cell. More... | |
void | add (const CellDomT &c, const tCombChain< CellImgT > &ch) |
Adds a chain to the image of the given cell. More... | |
tCombLinMap< CellDomT, CellImgT > & | operator+= (const tCombLinMap< CellDomT, CellImgT > &f) |
Adds another map to the given map. More... | |
tCombLinMap< CellDomT, CellImgT > & | negate () |
Replaces all the coefficients in the map with their negation. More... | |
void | removenum (int_t n) |
Removes the given cell from the domain of the map. More... | |
void | remove (const CellDomT &c) |
Removes the given cell from the domain of the map. More... | |
const tCombChain< CellImgT > & | operator() (int_t n) const |
Returns the image of the given cell. More... | |
tCombChain< CellImgT > | operator() (const CellDomT &c) const |
Returns the image of the given cell. More... | |
tCombChain< CellImgT > | operator() (const tCombChain< CellDomT > &ch) const |
Computes the image of the given chain. More... | |
tCombTensor< CellImgT, CellImgT > | operator() (const tCombTensor< CellDomT, CellDomT > &ch) const |
Computes the image of the given tensor. More... | |
int_t | size () const |
Returns the number of elements in the domain of the combinatorial map. More... | |
const CellDomT & | operator[] (int_t n) const |
Returns the n-th element of the domain of the combinatorial map. More... | |
tCombChain< CellImgT > & | getImage (int_t n) |
Returns the image of the given cell for editing. More... | |
tCombChain< CellImgT > & | getImage (const CellDomT &c) |
Returns the image of the given cell for editing. More... | |
bool | operator== (const tCombLinMap< CellDomT, CellImgT > &f) const |
Verifies if the two combinatorial linear maps are the same. More... | |
void | swap (tCombLinMap< CellDomT, CellImgT > &f) |
Swaps the data with another combinatorial linear map. More... | |
Private Attributes | |
chomp::homology::hashedset< CellDomT > | domain |
The domain of the map. More... | |
chomp::homology::multitable< tCombChain< CellImgT > > | images |
The chains in the images of each domain element. More... | |
A combinatorial linear map.
This is in fact a finite set of cells mapped to a chain each. It corresponds to a linear map on the vector space generated by the cells over the coefficients field F_2 (a.k.a. Z_2).
Definition at line 56 of file comblinmap.h.
typedef CellDomT tCombLinMap< CellDomT, CellImgT >::CellDomType |
The type of cells in the domain of the combinatorial linear map.
Definition at line 60 of file comblinmap.h.
typedef CellImgT tCombLinMap< CellDomT, CellImgT >::CellImgType |
The type of cells in the images of the combinatorial linear map.
Definition at line 63 of file comblinmap.h.
typedef tCombChain<CellDomT> tCombLinMap< CellDomT, CellImgT >::ChainDomType |
The type of the corresponding domain chain.
Definition at line 69 of file comblinmap.h.
typedef tCombChain<CellImgT> tCombLinMap< CellDomT, CellImgT >::ChainImgType |
The type of the corresponding image chain.
Definition at line 72 of file comblinmap.h.
typedef tZ2 tCombLinMap< CellDomT, CellImgT >::CoefType |
The type of coefficients in the chain.
Definition at line 66 of file comblinmap.h.
typedef tCombTensor<CellDomT,CellDomT> tCombLinMap< CellDomT, CellImgT >::TensorDomType |
The type of the corresponding domain chain.
Definition at line 75 of file comblinmap.h.
typedef tCombTensor<CellImgT,CellImgT> tCombLinMap< CellDomT, CellImgT >::TensorImgType |
The type of the corresponding image chain.
Definition at line 78 of file comblinmap.h.
|
inline |
The default constructor.
Definition at line 158 of file comblinmap.h.
|
inline |
Adds a cell to the domain of the map, with zero image, and returns its number.
Definition at line 165 of file comblinmap.h.
References tCombLinMap< CellDomT, CellImgT >::domain.
Referenced by tCombLinMap< CellDomT, CellImgT >::add(), addIdentity(), tCombLinMap< CellDomT, CellImgT >::getImage(), tCombLinMap< CellDomT, CellImgT >::operator()(), operator*(), and tCombLinMap< CellDomT, CellImgT >::operator+=().
|
inline |
Adds a cell to the image of the given cell.
Definition at line 172 of file comblinmap.h.
References tCombLinMap< CellDomT, CellImgT >::add(), tCombLinMap< CellDomT, CellImgT >::domain, tCombLinMap< CellDomT, CellImgT >::images, and tCombLinMap< CellDomT, CellImgT >::size().
|
inline |
Adds a chain to the image of the given cell.
Definition at line 186 of file comblinmap.h.
References tCombLinMap< CellDomT, CellImgT >::add(), tCombLinMap< CellDomT, CellImgT >::domain, tCombLinMap< CellDomT, CellImgT >::images, and tCombLinMap< CellDomT, CellImgT >::size().
|
inline |
Returns the image of the given cell for editing.
Definition at line 320 of file comblinmap.h.
References tCombLinMap< CellDomT, CellImgT >::images.
Referenced by tCombLinMap< CellDomT, CellImgT >::operator[]().
|
inline |
Returns the image of the given cell for editing.
Definition at line 327 of file comblinmap.h.
References tCombLinMap< CellDomT, CellImgT >::add(), tCombLinMap< CellDomT, CellImgT >::domain, tCombLinMap< CellDomT, CellImgT >::images, and tCombLinMap< CellDomT, CellImgT >::size().
|
inline |
Replaces all the coefficients in the map with their negation.
Definition at line 230 of file comblinmap.h.
|
inline |
Returns the image of the given cell.
Definition at line 257 of file comblinmap.h.
References tCombLinMap< CellDomT, CellImgT >::images.
|
inline |
Returns the image of the given cell.
Definition at line 264 of file comblinmap.h.
References tCombLinMap< CellDomT, CellImgT >::domain, and tCombLinMap< CellDomT, CellImgT >::images.
|
inline |
Computes the image of the given chain.
Definition at line 275 of file comblinmap.h.
References tCombLinMap< CellDomT, CellImgT >::domain, tCombLinMap< CellDomT, CellImgT >::images, and tCombLinMap< CellDomT, CellImgT >::size().
|
inline |
Computes the image of the given tensor.
Definition at line 291 of file comblinmap.h.
References tCombLinMap< CellDomT, CellImgT >::add(), tCombLinMap< CellDomT, CellImgT >::domain, tCombLinMap< CellDomT, CellImgT >::images, and tCombLinMap< CellDomT, CellImgT >::size().
|
inline |
Adds another map to the given map.
Definition at line 216 of file comblinmap.h.
References tCombLinMap< CellDomT, CellImgT >::add(), tCombLinMap< CellDomT, CellImgT >::domain, tCombLinMap< CellDomT, CellImgT >::images, and tCombLinMap< CellDomT, CellImgT >::size().
|
inline |
Verifies if the two combinatorial linear maps are the same.
Definition at line 340 of file comblinmap.h.
References tCombLinMap< CellDomT, CellImgT >::domain, tCombLinMap< CellDomT, CellImgT >::images, tCombLinMap< CellDomT, CellImgT >::size(), and tCombLinMap< CellDomT, CellImgT >::swap().
|
inline |
Returns the n-th element of the domain of the combinatorial map.
Definition at line 313 of file comblinmap.h.
References tCombLinMap< CellDomT, CellImgT >::domain, and tCombLinMap< CellDomT, CellImgT >::getImage().
|
inline |
Removes the given cell from the domain of the map.
Note that this may change the order of cells in the domain.
Definition at line 247 of file comblinmap.h.
References tCombLinMap< CellDomT, CellImgT >::domain, and tCombLinMap< CellDomT, CellImgT >::removenum().
|
inline |
Removes the given cell from the domain of the map.
Note that this may change the order of cells in the domain.
Definition at line 236 of file comblinmap.h.
References tCombLinMap< CellDomT, CellImgT >::domain, tCombLinMap< CellDomT, CellImgT >::images, tCombLinMap< CellDomT, CellImgT >::size(), and tCombLinMap< CellDomT, CellImgT >::swap().
Referenced by tCombLinMap< CellDomT, CellImgT >::remove().
|
inline |
Returns the number of elements in the domain of the combinatorial map.
Note that the images of some of the elements might be zero.
Definition at line 306 of file comblinmap.h.
References tCombLinMap< CellDomT, CellImgT >::domain.
Referenced by tCombLinMap< CellDomT, CellImgT >::add(), addIdentity(), tCombLinMap< CellDomT, CellImgT >::getImage(), tCombLinMap< CellDomT, CellImgT >::operator()(), operator*(), tCombLinMap< CellDomT, CellImgT >::operator+=(), operator<<(), tCombLinMap< CellDomT, CellImgT >::operator==(), and tCombLinMap< CellDomT, CellImgT >::removenum().
|
inline |
Swaps the data with another combinatorial linear map.
Definition at line 373 of file comblinmap.h.
References tCombLinMap< CellDomT, CellImgT >::domain, and tCombLinMap< CellDomT, CellImgT >::images.
Referenced by tCombLinMap< CellDomT, CellImgT >::operator==(), and tCombLinMap< CellDomT, CellImgT >::removenum().
|
private |
The domain of the map.
Definition at line 148 of file comblinmap.h.
Referenced by tCombLinMap< CellDomT, CellImgT >::add(), tCombLinMap< CellDomT, CellImgT >::getImage(), tCombLinMap< CellDomT, CellImgT >::operator()(), tCombLinMap< CellDomT, CellImgT >::operator+=(), tCombLinMap< CellDomT, CellImgT >::operator==(), tCombLinMap< CellDomT, CellImgT >::operator[](), tCombLinMap< CellDomT, CellImgT >::remove(), tCombLinMap< CellDomT, CellImgT >::removenum(), tCombLinMap< CellDomT, CellImgT >::size(), and tCombLinMap< CellDomT, CellImgT >::swap().
|
private |
The chains in the images of each domain element.
Definition at line 151 of file comblinmap.h.
Referenced by tCombLinMap< CellDomT, CellImgT >::add(), tCombLinMap< CellDomT, CellImgT >::getImage(), tCombLinMap< CellDomT, CellImgT >::operator()(), tCombLinMap< CellDomT, CellImgT >::operator+=(), tCombLinMap< CellDomT, CellImgT >::operator==(), tCombLinMap< CellDomT, CellImgT >::removenum(), and tCombLinMap< CellDomT, CellImgT >::swap().