|
JINRLIB Program LibraryVEC / MTX - 3D geometry utilityAuthors: Mihai Tiberiu Dima, Maria Dima |
|
Highlights The 2 classes field embodiments of 3D-vectors (vec) and 3D-matrices (mtx) in a high performance slimline templated polymorphic package - part of the NXV4 "Math_on_Paper Software" concept, allowing users to work with the computer almost as with pen on paper. Example
mtx<cpx<int>> Lz(0, i, 0, double + mtx<cpx<int>> = mtx<cpx<double>> The classes are move-semantix compliant, for superior speed, and slim (all strictly non-class members being implemented as friend operators and functions - for a total of over 2836 vec and 5084 mtx instantiations of the usual algebraic/logical operators). The classes overload the cout operator to display wave-vectors and spin operators in a pedantic manner. Example cout << boolalpha << Lz << endl ; | -i 0 0 |.mtx<cpx.int> | 0 0 0 | | 1 i 0 | | -i 1 0 |.mtx<cpx.int> | 0 0 1 | | 1 i 0 | | -i 1 0 | | 0 0 1 | 3|e1>+i|e2>-2|e3>.vec<cpx.int> The mtx class implements exp and log functions, as well as diagonalisation and eigen-values/vec's, itself and vec together with the full complement of algebraic and logical operators for instantiations with: int, float, double, long double, cpx<int>, cpx<float>, cpx<double>, cpx<long double>.
This project was realised in the framework of the 05-6-1119-2014/2023 "New Investigation Tools in Computational Physics" research theme, of the Meshcheryakov Laboratory of Information Technologies JINR. |