| ||||||||||||

| ||||||||||||

| ||||||||||||

Description | ||||||||||||

Generic interface for the most common functions. Using it we can write higher level algorithms and testing properties for both real and complex matrices. Specific functions for particular base types can also be explicitly imported from Numeric.LinearAlgebra.LAPACK. | ||||||||||||

Synopsis | ||||||||||||

Supported types | ||||||||||||

| ||||||||||||

| ||||||||||||

Products | ||||||||||||

| ||||||||||||

Matrix product. | ||||||||||||

| ||||||||||||

Euclidean inner product. | ||||||||||||

| ||||||||||||

Outer product of two vectors. > | ||||||||||||

| ||||||||||||

Kronecker product of two matrices. m1=(2><3) [ 1.0, 2.0, 0.0 , 0.0, -1.0, 3.0 ] m2=(4><3) [ 1.0, 2.0, 3.0 , 4.0, 5.0, 6.0 , 7.0, 8.0, 9.0 , 10.0, 11.0, 12.0 ] > kronecker m1 m2 (8><9) [ 1.0, 2.0, 3.0, 2.0, 4.0, 6.0, 0.0, 0.0, 0.0 , 4.0, 5.0, 6.0, 8.0, 10.0, 12.0, 0.0, 0.0, 0.0 , 7.0, 8.0, 9.0, 14.0, 16.0, 18.0, 0.0, 0.0, 0.0 , 10.0, 11.0, 12.0, 20.0, 22.0, 24.0, 0.0, 0.0, 0.0 , 0.0, 0.0, 0.0, -1.0, -2.0, -3.0, 3.0, 6.0, 9.0 , 0.0, 0.0, 0.0, -4.0, -5.0, -6.0, 12.0, 15.0, 18.0 , 0.0, 0.0, 0.0, -7.0, -8.0, -9.0, 21.0, 24.0, 27.0 , 0.0, 0.0, 0.0, -10.0, -11.0, -12.0, 30.0, 33.0, 36.0 ] | ||||||||||||

Linear Systems | ||||||||||||

| ||||||||||||

Solve a linear system (for square coefficient matrix and several right-hand sides) using the LU decomposition. For underconstrained or overconstrained systems use linearSolveLS or linearSolveSVD.
It is similar to luSolve . luPacked, but linearSolve raises an error if called on a singular system.
| ||||||||||||

| ||||||||||||

Solution of a linear system (for several right hand sides) from the precomputed LU factorization obtained by luPacked.
| ||||||||||||

| ||||||||||||

Least squared error solution of an overconstrained linear system, or the minimum norm solution of an underconstrained system. For rank-deficient systems use linearSolveSVD.
| ||||||||||||

| ||||||||||||

Minimum norm solution of a general linear least squares problem Ax=B using the SVD. Admits rank-deficient systems but it is slower than linearSolveLS. The effective rank of A is determined by treating as zero those singular valures which are less than eps times the largest singular value.
| ||||||||||||

| ||||||||||||

Inverse of a square matrix. | ||||||||||||

| ||||||||||||

Pseudoinverse of a general matrix. | ||||||||||||

| ||||||||||||

Determinant of a square matrix. | ||||||||||||

| ||||||||||||

Number of linearly independent rows or columns. | ||||||||||||

| ||||||||||||

Reciprocal of the 2-norm condition number of a matrix, computed from the singular values. | ||||||||||||

Matrix factorizations | ||||||||||||

Singular value decomposition | ||||||||||||

| ||||||||||||

Full singular value decomposition. | ||||||||||||

| ||||||||||||

A version of If | ||||||||||||

| ||||||||||||

A version of If | ||||||||||||

| ||||||||||||

Similar to thinSVD, returning only the nonzero singular values and the corresponding singular vectors.
| ||||||||||||

| ||||||||||||

Singular values only. | ||||||||||||

| ||||||||||||

Singular values and all right singular vectors. | ||||||||||||

| ||||||||||||

Singular values and all right singular vectors. | ||||||||||||

Eigensystems | ||||||||||||

| ||||||||||||

Eigenvalues and eigenvectors of a general square matrix. If | ||||||||||||

| ||||||||||||

Eigenvalues and Eigenvectors of a complex hermitian or real symmetric matrix. If | ||||||||||||

| ||||||||||||

Similar to eigSH without checking that the input matrix is hermitian or symmetric.
| ||||||||||||

| ||||||||||||

Eigenvalues of a general square matrix. | ||||||||||||

| ||||||||||||

Eigenvalues of a complex hermitian or real symmetric matrix. | ||||||||||||

| ||||||||||||

Similar to eigenvaluesSH without checking that the input matrix is hermitian or symmetric.
| ||||||||||||

QR | ||||||||||||

| ||||||||||||

QR factorization. If | ||||||||||||

| ||||||||||||

RQ factorization. If | ||||||||||||

Cholesky | ||||||||||||

| ||||||||||||

Cholesky factorization of a positive definite hermitian or symmetric matrix. If | ||||||||||||

| ||||||||||||

Similar to chol without checking that the input matrix is hermitian or symmetric.
| ||||||||||||

Hessenberg | ||||||||||||

| ||||||||||||

Hessenberg factorization. If | ||||||||||||

Schur | ||||||||||||

| ||||||||||||

Schur factorization. If "Anything that the Jordan decomposition can do, the Schur decomposition can do better!" (Van Loan) | ||||||||||||

LU | ||||||||||||

| ||||||||||||

Explicit LU factorization of a general matrix. If | ||||||||||||

| ||||||||||||

Obtains the LU decomposition of a matrix in a compact data structure suitable for luSolve.
| ||||||||||||

Matrix functions | ||||||||||||

| ||||||||||||

Matrix exponential. It uses a direct translation of Algorithm 11.3.1 in Golub & Van Loan, based on a scaled Pade approximation. | ||||||||||||

| ||||||||||||

Matrix square root. Currently it uses a simple iterative algorithm described in Wikipedia.
It only works with invertible matrices that have a real solution. For diagonalizable matrices you can try m = (2><2) [4,9 ,0,4] :: Matrix Double >sqrtm m (2><2) [ 2.0, 2.25 , 0.0, 2.0 ] | ||||||||||||

| ||||||||||||

Generic matrix functions for diagonalizable matrices. For instance: logm = matFunc log | ||||||||||||

Nullspace | ||||||||||||

| ||||||||||||

| ||||||||||||

| ||||||||||||

The nullspace of a matrix, assumed to be one-dimensional, with machine precision. | ||||||||||||

| ||||||||||||

| ||||||||||||

Norms | ||||||||||||

| ||||||||||||

| ||||||||||||

| ||||||||||||

| ||||||||||||

Misc | ||||||||||||

| ||||||||||||

Generic conjugate transpose. | ||||||||||||

| ||||||||||||

The machine precision of a Double: eps = 2.22044604925031e-16 (the value used by GNU-Octave).
| ||||||||||||

| ||||||||||||

The imaginary unit: i = 0.0 :+ 1.0
| ||||||||||||

Util | ||||||||||||

| ||||||||||||

| ||||||||||||

| ||||||||||||

| ||||||||||||

| ||||||||||||

| ||||||||||||

| ||||||||||||

| ||||||||||||

Produced by Haddock version 2.6.0 |