The Lie basis class. More...
#include <libalgebra.h>
Public Types | |
typedef hall_basis::KEY | KEY |
Import of the KEY type. | |
typedef std::map< KEY, SCA > | MAP |
The MAP type. | |
typedef lie< SCA, RAT, n_letters, max_degree > | LIE |
The Free Lie Associative Algebra element type. | |
typedef RAT | RATIONAL |
The rationals. | |
Public Member Functions | |
lie_basis (void) | |
Constructs the basis for a finite number of letters. | |
const LIE & | prod (const KEY &k1, const KEY &k2) |
Returns the product of two key. | |
LIE | replace (const KEY &k, const std::vector< LET > &s, const std::vector< LIE * > &v, std::map< KEY, LIE > &table) |
Replaces letters by lie<> instances in a lie<> instance. | |
Friends | |
std::ostream & | operator<< (std::ostream &os, const std::pair< lie_basis *, KEY > &t) |
Outupts an std::pair<lie_basis*, KEY> to an std::ostream. |
The Lie basis class.
This is the basis used to implement the lie class as a specialisation of the algebra class. In the current implementation, the Lie basis class is a wrapper for the hall_basis class, with a prod() member function.
const LIE& alg::lie_basis< SCA, RAT, n_letters, max_degree >::prod | ( | const KEY & | k1, | |
const KEY & | k2 | |||
) | [inline] |
Returns the product of two key.
Returns the LIE instance corresponding to the product of the two basis elements k1 and k2. For performance reasons, the basis is enriched/grown dynamically and the already computed products are stored in a static multiplication table to speed up further calculations. This function returns a constant reference to the suitable table element.
LIE alg::lie_basis< SCA, RAT, n_letters, max_degree >::replace | ( | const KEY & | k, | |
const std::vector< LET > & | s, | |||
const std::vector< LIE * > & | v, | |||
std::map< KEY, LIE > & | table | |||
) | [inline] |
Replaces letters by lie<> instances in a lie<> instance.
Replaces the occurences of s letters in the expression of k by the lie<> elements in v, and returns the recursively expanded result. The already computed replacements are stored in table.