JOINT   INSTITUTE   FOR   NUCLEAR   RESEARCH
lit JINRLIB   Program   Library

VEC / MTX   -   3D geometry utility


Authors: Mihai Tiberiu Dima, Maria Dima
rus

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,
                          -i, 0, 0
                           0, 0, 0)
          double   u = 1.0 ;
          auto     z = u+Lz ;

Evidently, z will be instantiated as mtx<cpx<double>> - transparent to the user (grace to the class' type-calculator returning the appropriate type from the "+" operator):

         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  ;
         cout << z << endl               ;
         cout << noboolalpha << z << endl;
         cout << boolalpha << vec<cpx<int>>(3,i,-2) << endl;

will display:     | 0  i 0 |
           | -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>.

 


Documentation -   manual: vec and mtx, with main & application tutorials

Downloads        - C++ libs(1) as *.tgz, *.zip and examples: 1, 2, 3, 4, appl

                            (1)gcc-4.4.7 20120313 //... linux-2.6.32-504.12.2.el6.x86_64




     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.




home up e-mail