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:

- All standard numerical types, ANSI complex and bcd classes, tensors themselves and self defined classes could be used as arguments to tensor templates.
- Strict compile time type-safe checking includes vector/matrix/tensor dimensions and prevents accidental errors.
- Accurate template programming assures mathematically deep level of abstraction together with high efficiency of generated code. For example system of equations, defined with Matrix<double,100,100>, is solved in 3 sec (486DX2/33 MHz).
- Amount of tensor indexes is limited only by compiler. With BC++ v.4.52 it was possible to create tensors with at least 10 indexes.

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.