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.

Members

Classes

EigenvalueException
class EigenvalueException(T)

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.

Functions

det
Unqual!T det(MatrixView!(T, stor) m)
det_
Unqual!T det_(MatrixView!(T, stor) m)

Calculate the determinant of a square matrix.

eigenvalues
EigenvalueType!ElementT[] eigenvalues(MatrixView!(ElementT, stor, tri) m)
ComplexT[] eigenvalues(MatrixView!(ElementT, stor, tri) m, ComplexT[] buffer)

Calculate the eigenvalues of a general dense square matrix.

eigenvalues
T[] eigenvalues(MatrixView!(T, stor, tri) m, T[] buffer)

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
T[] eigenvalues(MatrixView!(T, stor, tri) m, T[] buffer)

Calculate the eigenvalues of a symmetric matrix.

eigenvalues_
EigenvalueType!ElementT[] eigenvalues_(MatrixView!(ElementT, stor, tri) m)
ComplexT[] eigenvalues_(MatrixView!(ElementT, stor, tri) m, ComplexT[] buffer)

Calculate the eigenvalues of a general dense square matrix.

eigenvalues_
T[] eigenvalues_(MatrixView!(T, stor, tri) m, T[] buffer)

Calculate the eigenvalues of a symmetric matrix.

invert
void invert(MatrixView!(T, stor) m)

Calculate the inverse of a matrix.

solve
Real[] solve(MatrixViewA a, Real[] b, Real[] buffer)
MatrixViewB solve(MatrixViewA a, MatrixViewB b)
solve_
Real[] solve_(MatrixViewA a, Real[] b)
MatrixViewB solve_(MatrixViewA a, MatrixViewB b)

Solve one or more systems of n linear equations in n variables.

Templates

EigenvalueType
template EigenvalueType(T)
Undocumented in source.

Meta

Authors

Lars Tandle Kyllingstad

License

Boost License 1.0