terrylyons / libalgebra

This C++ headers only library provides tools for manipulating elements of algebras; the tensor algebra, free lie algebra etc. Early versions can be found in sourceforge. It is capable of calculations over many rings including the arbitrary precision rationals from gmp/mpir . The associated library libalgebra_tests has many examples of how to use the code. the pypy package wraps a version of it - with a simple interface (and vastly reduced functionality)
12 stars 2 forks source link

Added initializer list ctor for _tensor_basis #28

Closed inakleinbottle closed 3 years ago

inakleinbottle commented 3 years ago

Added a new constructor for tensor words (when compiling with C++11 support) . With this, we can create tensor keys much more easily as follows:

using key_type = alg::_tensor_basis<2, 2>; // for example

key_type k { 1, 2, 1, 2};

This should create the tensor key (1,2,1,2).