# Linear Algebra Module

## Functions

void imaging::eigensystem (const ublas::matrix< float_t > &in, ublas::matrix< float_t > &eigenvectors, ublas::vector< float_t > &eigenvalues)
void imaging::symmetric_square_root (const ublas::matrix< float_t > &in, ublas::matrix< float_t > &root)
void imaging::square_root (const ublas::matrix< float_t > &in, ublas::matrix< float_t > &root)
void imaging::inverse_square_root (const ublas::matrix< float_t > &in, ublas::matrix< float_t > &root)
void imaging::inverse (const ublas::matrix< float_t > &in, ublas::matrix< float_t > &out)

## Detailed Description

The linear algebra module provides functions for ublas::matrix and ublas::vector which are not in uBLAS. Most of the functions pass its parameters to the appropriate functions of LAPACK. Instead of being a simple wrapper of LAPACK, the functions in this module usually perform higher level task than a single LAPACK function.

Note that this module provides solver for dense systems of linear equations but not for sparse systems. Sparse solvers are collected in the linear solver module.

## Function Documentation

 void imaging::eigensystem ( const ublas::matrix< float_t > & A, ublas::matrix< float_t > & eigenvectors, ublas::vector< float_t > & eigenvalues )

#include <lapack/linear_algebra.hpp>

Computes the eigenvectors and the corresponding eigenvalues of a symmetric and positive semidefinite matrix A. The eigenvalues are sorted from the largest to the smallest. The columns of eigenvectors are ordered in the same way. If is the matrix with components of eigenvalues in the diagonal and denotes the matrix eigenvectors, then

holds.

References imaging::max().

 void imaging::inverse ( const ublas::matrix< float_t > & A, ublas::matrix< float_t > & inverse )

#include <lapack/linear_algebra.hpp>

Computes the inverse of a non-singular matrix A.

 void imaging::inverse_square_root ( const ublas::matrix< float_t > & A, ublas::matrix< float_t > & root )

#include <lapack/linear_algebra.hpp>

For a symmetric and positive semidefinite matrix A, this function computes root such that if denote root as the relation

holds.

References imaging::eigensystem().

 void imaging::square_root ( const ublas::matrix< float_t > & A, ublas::matrix< float_t > & root )

#include <lapack/linear_algebra.hpp>

For a symmetric and positive semidefinite matrix A, this function computes root such that if denote root as the relation

holds.

References imaging::eigensystem().

 void imaging::symmetric_square_root ( const ublas::matrix< float_t > & A, ublas::matrix< float_t > & root )

#include <lapack/linear_algebra.hpp>

For a symmetric and positive semidefinite matrix A, this function computes root such that if denote root as the relation

holds.

References imaging::eigensystem().