# Linear algebra functions in Montjoie

All functions related to linear algebra are most of the time
defined in Seldon library. However some additional classes or
functions are contained in the directory **src/Algebra**. It
includes :

- An implementation of tiny 3-D array and tiny symmetric tensors (for elastics) (with loop unrolling) .
- Some C++ equivalent of Lapack routines so that you can use almost all the functionalities of Montjoie without linking with external libraries (but it may be less efficient, especially for sparse direct solvers). It is also useful to have these functions in order to run computations in multiple precision (with mpfr).
- An implementation of block-diagonal matrices, each block may concern non-successive row numbers.
- An implementation of skyline matrices and diagonal matrices
- An implementation of band matrix with a tiny bandwidth.

Seldon library and these additional classes and functions are
included when **MontjoieAlgebra.hxx** is included. A basic
example is given as

#include "Algebra/MontjoieAlgebra.hxx" using namespace Montjoie; int main(int argc, char** argv) { InitMontjoie(argc, argv); // to declare a block-diagonal matrix Matrix<Real_wp, General, BlockDiagRow> A; A.Reallocate(20, 20); A.Clear(); FinalizeMontjoie(); }