The monoid of words of a finite number of letters with shuffle product. More...
#include <libalgebra.h>
Public Types | |
typedef tensor_basis< SCA, n_letters, max_degree > | TBASIS |
The tensor_basis type. | |
typedef TBASIS::KEY | KEY |
Import of the KEY type. | |
typedef TBASIS::MAP | MAP |
Import of the MAP type. | |
typedef RAT | RATIONAL |
The rationals. | |
typedef shuffle_tensor< SCA, RAT, n_letters, max_degree > | TENSOR |
The Shuffle Associative Algebra elements type. | |
Public Member Functions | |
shuffle_tensor_basis (void) | |
Default constructor. | |
const TENSOR & | prod (const KEY &k1, const KEY &k2) const |
The shuffle product of two basis elements. | |
Friends | |
std::ostream & | operator<< (std::ostream &os, const std::pair< shuffle_tensor_basis *, KEY > &t) |
Outputs a std::pair<shuffle_tensor_basis*, KEY> to an std::ostream. |
The monoid of words of a finite number of letters with shuffle product.
This is the basis used to implement the shuffle_tensor class as a specialisation of the algebra class. This basis is the Free Associative Algebra basis with a finite number of letters, with the shuffle product. The shuffle_tensor_basis is a container of keys. A key is the implementation of a word of letters. The prod() member function corresponds to the shuffle product of the two keys given as arguments. This product is associative and commutative. Letters can be seen as particular basis keys, i.e. words of length one. The empty word is a special key used for the imbedding of letters (words of length one).
const TENSOR& alg::shuffle_tensor_basis< SCA, RAT, n_letters, max_degree >::prod | ( | const KEY & | k1, | |
const KEY & | k2 | |||
) | const [inline] |
The shuffle product of two basis elements.
Returns the shuffle_tensor obtained by the concatenation product of two keys viewed as words of letters. The result is a unidimensional shuffle_tensor with a unique key (the concatenation of k1 and k2) associated to the +1 scalar. The already computed products are stored in a static mutiplication table to speed up further calculations.