The ChainCon Software (Release 0.03)
Public Types | Public Member Functions | Private Attributes | List of all members
tCombTensor< Cell1T, Cell2T > Class Template Reference

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...
 

Detailed Description

template<class Cell1T, class Cell2T>
class tCombTensor< Cell1T, Cell2T >

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.

Member Typedef Documentation

◆ Cell1Type

template<class Cell1T, class Cell2T>
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.

◆ Cell2Type

template<class Cell1T, class Cell2T>
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.

◆ CoefType

template<class Cell1T, class Cell2T>
typedef tZ2 tCombTensor< Cell1T, Cell2T >::CoefType

The type of coefficients in the chain.

Definition at line 63 of file combtensor.h.

Constructor & Destructor Documentation

◆ tCombTensor()

template<class Cell1T , class Cell2T >
tCombTensor< Cell1T, Cell2T >::tCombTensor ( )
inline

The default constructor of an empty combinatorial tensor.

Definition at line 106 of file combtensor.h.

Member Function Documentation

◆ add() [1/2]

template<class Cell1T , class Cell2T >
void tCombTensor< Cell1T, Cell2T >::add ( const Cell1T &  c1,
const Cell2T &  c2 
)
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().

◆ add() [2/2]

template<class Cell1T , class Cell2T >
void tCombTensor< Cell1T, Cell2T >::add ( const tCombChain< Cell1T > &  c1,
const tCombChain< Cell2T > &  c2 
)
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.

◆ empty()

template<class Cell1T , class Cell2T >
bool tCombTensor< Cell1T, Cell2T >::empty ( ) const
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.

◆ left()

template<class Cell1T , class Cell2T >
const Cell1T & tCombTensor< Cell1T, Cell2T >::left ( int_t  n) const
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<<().

◆ operator+=()

template<class Cell1T , class Cell2T >
tCombTensor< Cell1T, Cell2T > & tCombTensor< Cell1T, Cell2T >::operator+= ( const tCombTensor< Cell1T, Cell2T > &  ch)
inline

Adds a given tensor to the combinatorial tensor.

Definition at line 162 of file combtensor.h.

References tCombTensor< Cell1T, Cell2T >::tensor.

◆ operator==()

template<class Cell1T , class Cell2T >
bool tCombTensor< Cell1T, Cell2T >::operator== ( const tCombTensor< Cell1T, Cell2T > &  ch) const
inline

Compares if the two tensors are equal.

Definition at line 170 of file combtensor.h.

References tCombTensor< Cell1T, Cell2T >::tensor.

◆ right()

template<class Cell1T , class Cell2T >
const Cell2T & tCombTensor< Cell1T, Cell2T >::right ( int_t  n) const
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<<().

◆ size()

template<class Cell1T , class Cell2T >
int_t tCombTensor< Cell1T, Cell2T >::size ( ) const
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<<().

◆ swap()

template<class Cell1T , class Cell2T >
void tCombTensor< Cell1T, Cell2T >::swap ( tCombTensor< Cell1T, Cell2T > &  ch)
inline

Swaps the data with another tensor.

Definition at line 176 of file combtensor.h.

References tCombTensor< Cell1T, Cell2T >::tensor.

Member Data Documentation

◆ tensor

template<class Cell1T, class Cell2T>
tCombChain<tPair<Cell1T,Cell2T> > tCombTensor< Cell1T, Cell2T >::tensor
private

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