The ChainCon Software (Release 0.03)
Public Types | Public Member Functions | Private Attributes | List of all members
tLinMap< CellDomT, CellImgT, CoefT > Class Template Reference

A linear map. More...

#include <linmap.h>

Public Types

typedef CellDomT CellDomType
 The type of cells in the domain of the linear map. More...
 
typedef CellImgT CellImgType
 The type of cells in the images of the linear map. More...
 
typedef CoefT CoefType
 The type of coefficients in the chain. More...
 
typedef tChain< CellDomT, CoefT > ChainDomType
 The type of the corresponding domain chain. More...
 
typedef tChain< CellImgT, CoefT > ChainImgType
 The type of the corresponding image chain. More...
 
typedef tTensor< CellDomT, CellDomT, CoefT > TensorDomType
 The type of the corresponding domain chain. More...
 
typedef tTensor< CellImgT, CellImgT, CoefT > TensorImgType
 The type of the corresponding image chain. More...
 

Public Member Functions

 tLinMap ()
 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, const CoefT &coef)
 Adds a cell to the image of the given cell. More...
 
void add (const CellDomT &c, const tChain< CellImgT, CoefT > &ch)
 Adds a chain to the image of the given cell. More...
 
tLinMap< CellDomT, CellImgT, CoefT > & operator+= (const tLinMap< CellDomT, CellImgT, CoefT > &f)
 Adds another map to the given map. More...
 
tLinMap< CellDomT, CellImgT, CoefT > & negate ()
 Replaces all the coefficients in the map with their negation. More...
 
tLinMap< CellDomT, CellImgT, CoefT > & operator*= (const CoefT &c)
 Multiplies all the coefficients in the map by the given number. 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 tChain< CellImgT, CoefT > & operator() (int_t n) const
 Returns the image of the given cell. More...
 
tChain< CellImgT, CoefT > operator() (const CellDomT &c) const
 Returns the image of the given cell. More...
 
tChain< CellImgT, CoefT > operator() (const tChain< CellDomT, CoefT > &ch) const
 Computes the image of the given chain. More...
 
tTensor< CellImgT, CellImgT, CoefT > operator() (const tTensor< CellDomT, CellDomT, CoefT > &ch) const
 Computes the image of the given tensor. More...
 
int_t size () const
 Returns the number of elements in the domain of the map. More...
 
const CellDomT & operator[] (int_t n) const
 Returns the n-th element of the domain of the map. More...
 
const chomp::homology::hashedset< CellDomT > & getDomain () const
 Returns the domain of the map. More...
 
tChain< CellImgT, CoefT > & getImage (int_t n)
 Returns the image of the given cell for editing. More...
 
tChain< CellImgT, CoefT > & getImage (const CellDomT &c)
 Returns the image of the given cell for editing. More...
 
bool operator== (const tLinMap< CellDomT, CellImgT, CoefT > &f) const
 Verifies if the two linear maps are the same. More...
 
void swap (tLinMap< CellDomT, CellImgT, CoefT > &f)
 Swaps the data with another linear map. More...
 

Private Attributes

chomp::homology::hashedset< CellDomT > domain
 The domain of the map. More...
 
chomp::homology::multitable< tChain< CellImgT, CoefT > > images
 The chains in the images of each domain element. More...
 

Detailed Description

template<class CellDomT, class CellImgT, class CoefT>
class tLinMap< CellDomT, CellImgT, CoefT >

A 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 55 of file linmap.h.

Member Typedef Documentation

◆ CellDomType

template<class CellDomT, class CellImgT, class CoefT>
typedef CellDomT tLinMap< CellDomT, CellImgT, CoefT >::CellDomType

The type of cells in the domain of the linear map.

Definition at line 59 of file linmap.h.

◆ CellImgType

template<class CellDomT, class CellImgT, class CoefT>
typedef CellImgT tLinMap< CellDomT, CellImgT, CoefT >::CellImgType

The type of cells in the images of the linear map.

Definition at line 62 of file linmap.h.

◆ ChainDomType

template<class CellDomT, class CellImgT, class CoefT>
typedef tChain<CellDomT,CoefT> tLinMap< CellDomT, CellImgT, CoefT >::ChainDomType

The type of the corresponding domain chain.

Definition at line 68 of file linmap.h.

◆ ChainImgType

template<class CellDomT, class CellImgT, class CoefT>
typedef tChain<CellImgT,CoefT> tLinMap< CellDomT, CellImgT, CoefT >::ChainImgType

The type of the corresponding image chain.

Definition at line 71 of file linmap.h.

◆ CoefType

template<class CellDomT, class CellImgT, class CoefT>
typedef CoefT tLinMap< CellDomT, CellImgT, CoefT >::CoefType

The type of coefficients in the chain.

Definition at line 65 of file linmap.h.

◆ TensorDomType

template<class CellDomT, class CellImgT, class CoefT>
typedef tTensor<CellDomT,CellDomT,CoefT> tLinMap< CellDomT, CellImgT, CoefT >::TensorDomType

The type of the corresponding domain chain.

Definition at line 74 of file linmap.h.

◆ TensorImgType

template<class CellDomT, class CellImgT, class CoefT>
typedef tTensor<CellImgT,CellImgT,CoefT> tLinMap< CellDomT, CellImgT, CoefT >::TensorImgType

The type of the corresponding image chain.

Definition at line 77 of file linmap.h.

Constructor & Destructor Documentation

◆ tLinMap()

template<class CellDomT , class CellImgT , class CoefT >
tLinMap< CellDomT, CellImgT, CoefT >::tLinMap ( )
inline

The default constructor.

Definition at line 163 of file linmap.h.

Member Function Documentation

◆ add() [1/3]

template<class CellDomT , class CellImgT , class CoefT >
int_t tLinMap< CellDomT, CellImgT, CoefT >::add ( const CellDomT &  c)
inline

◆ add() [2/3]

template<class CellDomT , class CellImgT , class CoefT >
void tLinMap< CellDomT, CellImgT, CoefT >::add ( const CellDomT &  c,
const CellImgT &  d,
const CoefT &  coef 
)
inline

◆ add() [3/3]

template<class CellDomT , class CellImgT , class CoefT >
void tLinMap< CellDomT, CellImgT, CoefT >::add ( const CellDomT &  c,
const tChain< CellImgT, CoefT > &  ch 
)
inline

◆ getDomain()

template<class CellDomT , class CellImgT , class CoefT >
const chomp::homology::hashedset< CellDomT > & tLinMap< CellDomT, CellImgT, CoefT >::getDomain ( ) const
inline

Returns the domain of the map.

Definition at line 357 of file linmap.h.

References tLinMap< CellDomT, CellImgT, CoefT >::domain, and tLinMap< CellDomT, CellImgT, CoefT >::getImage().

◆ getImage() [1/2]

template<class CellDomT , class CellImgT , class CoefT >
tChain< CellImgT, CoefT > & tLinMap< CellDomT, CellImgT, CoefT >::getImage ( int_t  n)
inline

Returns the image of the given cell for editing.

Definition at line 364 of file linmap.h.

References tLinMap< CellDomT, CellImgT, CoefT >::images.

Referenced by tLinMap< CellDomT, CellImgT, CoefT >::getDomain().

◆ getImage() [2/2]

template<class CellDomT , class CellImgT , class CoefT >
tChain< CellImgT, CoefT > & tLinMap< CellDomT, CellImgT, CoefT >::getImage ( const CellDomT &  c)
inline

◆ negate()

template<class CellDomT , class CellImgT , class CoefT >
tLinMap< CellDomT, CellImgT, CoefT > & tLinMap< CellDomT, CellImgT, CoefT >::negate ( )
inline

Replaces all the coefficients in the map with their negation.

Definition at line 235 of file linmap.h.

References tLinMap< CellDomT, CellImgT, CoefT >::domain, tLinMap< CellDomT, CellImgT, CoefT >::images, and tLinMap< CellDomT, CellImgT, CoefT >::size().

◆ operator()() [1/4]

template<class CellDomT , class CellImgT , class CoefT >
const tChain< CellImgT, CoefT > & tLinMap< CellDomT, CellImgT, CoefT >::operator() ( int_t  n) const
inline

Returns the image of the given cell.

Definition at line 275 of file linmap.h.

References tLinMap< CellDomT, CellImgT, CoefT >::images.

◆ operator()() [2/4]

template<class CellDomT , class CellImgT , class CoefT >
tChain< CellImgT, CoefT > tLinMap< CellDomT, CellImgT, CoefT >::operator() ( const CellDomT &  c) const
inline

Returns the image of the given cell.

Definition at line 282 of file linmap.h.

References tLinMap< CellDomT, CellImgT, CoefT >::domain, and tLinMap< CellDomT, CellImgT, CoefT >::images.

◆ operator()() [3/4]

template<class CellDomT , class CellImgT , class CoefT >
tChain< CellImgT, CoefT > tLinMap< CellDomT, CellImgT, CoefT >::operator() ( const tChain< CellDomT, CoefT > &  ch) const
inline

◆ operator()() [4/4]

template<class CellDomT , class CellImgT , class CoefT >
tTensor< CellImgT, CellImgT, CoefT > tLinMap< CellDomT, CellImgT, CoefT >::operator() ( const tTensor< CellDomT, CellDomT, CoefT > &  ch) const
inline

◆ operator*=()

template<class CellDomT , class CellImgT , class CoefT >
tLinMap< CellDomT, CellImgT, CoefT > & tLinMap< CellDomT, CellImgT, CoefT >::operator*= ( const CoefT &  c)
inline

Multiplies all the coefficients in the map by the given number.

Definition at line 245 of file linmap.h.

References tLinMap< CellDomT, CellImgT, CoefT >::domain, tLinMap< CellDomT, CellImgT, CoefT >::images, and tLinMap< CellDomT, CellImgT, CoefT >::size().

◆ operator+=()

template<class CellDomT , class CellImgT , class CoefT >
tLinMap< CellDomT, CellImgT, CoefT > & tLinMap< CellDomT, CellImgT, CoefT >::operator+= ( const tLinMap< CellDomT, CellImgT, CoefT > &  f)
inline

◆ operator==()

template<class CellDomT , class CellImgT , class CoefT >
bool tLinMap< CellDomT, CellImgT, CoefT >::operator== ( const tLinMap< CellDomT, CellImgT, CoefT > &  f) const
inline

◆ operator[]()

template<class CellDomT , class CellImgT , class CoefT >
const CellDomT & tLinMap< CellDomT, CellImgT, CoefT >::operator[] ( int_t  n) const
inline

Returns the n-th element of the domain of the map.

Definition at line 350 of file linmap.h.

References tLinMap< CellDomT, CellImgT, CoefT >::domain.

◆ remove()

template<class CellDomT , class CellImgT , class CoefT >
void tLinMap< CellDomT, CellImgT, CoefT >::remove ( const CellDomT &  c)
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 265 of file linmap.h.

References tLinMap< CellDomT, CellImgT, CoefT >::domain, and tLinMap< CellDomT, CellImgT, CoefT >::removenum().

◆ removenum()

template<class CellDomT , class CellImgT , class CoefT >
void tLinMap< CellDomT, CellImgT, CoefT >::removenum ( int_t  n)
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 254 of file linmap.h.

References tLinMap< CellDomT, CellImgT, CoefT >::domain, tLinMap< CellDomT, CellImgT, CoefT >::images, tLinMap< CellDomT, CellImgT, CoefT >::size(), and tLinMap< CellDomT, CellImgT, CoefT >::swap().

Referenced by tLinMap< CellDomT, CellImgT, CoefT >::remove().

◆ size()

template<class CellDomT , class CellImgT , class CoefT >
int_t tLinMap< CellDomT, CellImgT, CoefT >::size ( ) const
inline

◆ swap()

template<class CellDomT , class CellImgT , class CoefT >
void tLinMap< CellDomT, CellImgT, CoefT >::swap ( tLinMap< CellDomT, CellImgT, CoefT > &  f)
inline

Member Data Documentation

◆ domain

template<class CellDomT, class CellImgT, class CoefT>
chomp::homology::hashedset<CellDomT> tLinMap< CellDomT, CellImgT, CoefT >::domain
private

◆ images

template<class CellDomT, class CellImgT, class CoefT>
chomp::homology::multitable<tChain<CellImgT,CoefT> > tLinMap< CellDomT, CellImgT, CoefT >::images
private

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