C++ Tensor Template Library (TTL)



TENSOR.ARJ contains template header, its description, sample sources, showing the simplicity of using the header, and demo program which demonstrates its multiple application capabilities. Less than 1000 lines long header (including comments) implements as recursive templates mathematically strict all vector, matrix and partially tensor algebras. A lot of dull programming problems from coordinate transformations to solution of systems of equations could be solved just with the help of only four arithmetic operators ( +, -, *, / ) defined in TENSOR.H.

Here are some other template features:

Please use ARJ X TENSOR.ARJ to restore the whole directory tree with demo program project. To create your own programs Borland C++ compiler starting with version 4.0 will be necessary. TENSOR.H essentially exploits template extensions (I don't know other compilers which support them).

Hope you will find useful this source itself and ideas, which alowed this implementation.

29.01.2007: I have added TTL.CBP - a demo project for Code::Blocks and checked that it compiles at least with three compilers: GNU GCC, MS VC++ 2003, Borland 5.0. The sources are packed now into 7-zip self extracting archive ttl-1.0.exe.