You are here

Linear Algebra

The ROOT Linear Algebra library (libMatrix)  provides C++ matrix classes and it is supposed to give a complete environment in ROOT for calculations such as solving linear equations or eigenvalue decomposition. For more information see the Linear algebra chapter in the User Guide. See also the Linear Algebra How To

In addition, ROOT provides a new package, SMatrix, for high performance vector and matrix computations. It has been introduced in ROOT v5.08. It is optimized for describing small matrices and vectors. SMatrix contains the generic ROOT::Math::SMatrix and ROOT::Math::SVector classes for describing matrices and vectors of arbitrary dimensions and of arbitrary type. The classes are templated on the scalar type and on the size. Therefore, the matrix/vector dimension has to be known at compile time. An advantage of using the dimension as template parameters is that the correctness of dimension in the matrix/vector operations can be checked at compile time.