Public Types | Public Member Functions | Friends

alg::lie_basis< SCA, RAT, n_letters, max_degree > Class Template Reference

The Lie basis class. More...

#include <libalgebra.h>

Inheritance diagram for alg::lie_basis< SCA, RAT, n_letters, max_degree >:
alg::hall_basis alg::basis_traits< With_Degree, n_letters, max_degree >

List of all members.

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

Detailed Description

template<typename SCA, typename RAT, DEG n_letters, DEG max_degree>
class alg::lie_basis< SCA, RAT, n_letters, max_degree >

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.


Member Function Documentation

template<typename SCA , typename RAT , DEG n_letters, DEG max_degree>
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.

template<typename SCA , typename RAT , DEG n_letters, DEG max_degree>
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.


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