Module scid.linalg

This module contains functions related to linear algebra.

For the time being these functions are just a user-friendly interface to the corresponding LAPACK functions. Hence, one can only use matrices and vectors where the elements are of FORTRAN-compatible types, namely:

float
double
Complex!float
Complex!double

Specifically, real- and creal-valued matrices/vectors cannot be used.

Note

Some of the functions in this module come in two forms with the same function signature, but where the name of one ends with an underscore. An example is

solve(a, b)
solve_(a, b)

The difference between these is that, for performance reasons, the underscore-suffixed functions use some or all of the input matrices/vectors as a workspace, and one can't expect them to contain the same values after the function returns. The functions without an underscore suffix simply copy the input data and calls the high-performance function using the copied data as input.

Functions

Name Description
det Calculate the determinant of a square matrix.
det_ Calculate the determinant of a square matrix.
eigenvalues Calculate the eigenvalues of a general dense square matrix.
eigenvalues Calculate the eigenvalues of a triangular matrix. Note that this is a trivial operation - the function just returns the diagonal entries of the matrix.
eigenvalues Calculate the eigenvalues of a symmetric matrix.
eigenvalues_ Calculate the eigenvalues of a general dense square matrix.
eigenvalues_ Calculate the eigenvalues of a symmetric matrix.
invert Calculate the inverse of a matrix.
solve Solve one or more systems of n linear equations in n variables.
solve_ Solve one or more systems of n linear equations in n variables.

Classes

Name Description
EigenvalueException This exception is thrown when the eigenvalue() function fails to compute all eigenvalues. The ones that have been computed are stored in the member variable eigenvalues.

Templates

Name Description
EigenvalueType

Authors

Lars Tandle Kyllingstad

Copyright

Copyright (c) 2009, Lars T. Kyllingstad. All rights reserved.

License

Boost License 1.0