The ChainCon Software (Release 0.03)
|
Combinatorial tensor of cells. More...
#include <combtensor.h>
Public Types | |
typedef Cell1T | Cell1Type |
The type of cells on the left in the combinatorial tensor. More... | |
typedef Cell2T | Cell2Type |
The type of cells on the right in the combinatorial tensor. More... | |
typedef tZ2 | CoefType |
The type of coefficients in the chain. More... | |
Public Member Functions | |
tCombTensor () | |
The default constructor of an empty combinatorial tensor. More... | |
int_t | size () const |
Returns the number of elements in the combinatorial tensor. More... | |
bool | empty () const |
Returns true if and only if the tensor is zero (empty set). More... | |
const Cell1T & | left (int_t n) const |
Returns the n-th left element of the combinatorial tensor. More... | |
const Cell2T & | right (int_t n) const |
Returns the n-th right element of the combinatorial tensor. More... | |
void | add (const Cell1T &c1, const Cell2T &c2) |
Adds a pair of cells to the combinatorial tensor. More... | |
void | add (const tCombChain< Cell1T > &c1, const tCombChain< Cell2T > &c2) |
Adds a pair of chains to the combinatorial tensor. More... | |
tCombTensor< Cell1T, Cell2T > & | operator+= (const tCombTensor< Cell1T, Cell2T > &ch) |
Adds a given tensor to the combinatorial tensor. More... | |
bool | operator== (const tCombTensor< Cell1T, Cell2T > &ch) const |
Compares if the two tensors are equal. More... | |
void | swap (tCombTensor< Cell1T, Cell2T > &ch) |
Swaps the data with another tensor. More... | |
Private Attributes | |
tCombChain< tPair< Cell1T, Cell2T > > | tensor |
The set of elements in the combinatorial tensor. More... | |
Combinatorial tensor of cells.
This is in fact a list of pairs of cells of the given type. One can add products of chains to the tensor, which is then decomposed into tensors of individual cells and reduced.
Definition at line 53 of file combtensor.h.
typedef Cell1T tCombTensor< Cell1T, Cell2T >::Cell1Type |
The type of cells on the left in the combinatorial tensor.
Definition at line 57 of file combtensor.h.
typedef Cell2T tCombTensor< Cell1T, Cell2T >::Cell2Type |
The type of cells on the right in the combinatorial tensor.
Definition at line 60 of file combtensor.h.
typedef tZ2 tCombTensor< Cell1T, Cell2T >::CoefType |
The type of coefficients in the chain.
Definition at line 63 of file combtensor.h.
|
inline |
The default constructor of an empty combinatorial tensor.
Definition at line 106 of file combtensor.h.
|
inline |
Adds a pair of cells to the combinatorial tensor.
Definition at line 137 of file combtensor.h.
References tCombTensor< Cell1T, Cell2T >::tensor.
Referenced by tCombTensor< Cell1T, Cell2T >::add(), and tCombTensor< Cell1T, Cell2T >::right().
|
inline |
Adds a pair of chains to the combinatorial tensor.
Definition at line 144 of file combtensor.h.
References tCombTensor< Cell1T, Cell2T >::add(), tCombTensor< Cell1T, Cell2T >::size(), and tCombTensor< Cell1T, Cell2T >::tensor.
|
inline |
Returns true if and only if the tensor is zero (empty set).
Definition at line 118 of file combtensor.h.
References tCombTensor< Cell1T, Cell2T >::tensor.
|
inline |
Returns the n-th left element of the combinatorial tensor.
Definition at line 124 of file combtensor.h.
References tCombTensor< Cell1T, Cell2T >::tensor.
Referenced by operator<<().
|
inline |
Adds a given tensor to the combinatorial tensor.
Definition at line 162 of file combtensor.h.
References tCombTensor< Cell1T, Cell2T >::tensor.
|
inline |
Compares if the two tensors are equal.
Definition at line 170 of file combtensor.h.
References tCombTensor< Cell1T, Cell2T >::tensor.
|
inline |
Returns the n-th right element of the combinatorial tensor.
Definition at line 130 of file combtensor.h.
References tCombTensor< Cell1T, Cell2T >::add(), and tCombTensor< Cell1T, Cell2T >::tensor.
Referenced by operator<<().
|
inline |
Returns the number of elements in the combinatorial tensor.
Definition at line 112 of file combtensor.h.
References tCombTensor< Cell1T, Cell2T >::tensor.
Referenced by tCombTensor< Cell1T, Cell2T >::add(), and operator<<().
|
inline |
Swaps the data with another tensor.
Definition at line 176 of file combtensor.h.
References tCombTensor< Cell1T, Cell2T >::tensor.
|
private |
The set of elements in the combinatorial tensor.
Definition at line 99 of file combtensor.h.
Referenced by tCombTensor< Cell1T, Cell2T >::add(), tCombTensor< Cell1T, Cell2T >::empty(), tCombTensor< Cell1T, Cell2T >::left(), tCombTensor< Cell1T, Cell2T >::operator+=(), tCombTensor< Cell1T, Cell2T >::operator==(), tCombTensor< Cell1T, Cell2T >::right(), tCombTensor< Cell1T, Cell2T >::size(), and tCombTensor< Cell1T, Cell2T >::swap().