hmatrix-0.15.2.1: Linear algebra and numerical computation

Portability portable (uses FFI) provisional Alberto Ruiz (aruiz at um dot es) None

Numeric.LinearAlgebra.LAPACK

Description

Functional interface to selected LAPACK functions (http://www.netlib.org/lapack).

Synopsis

# Matrix product

Matrix product based on BLAS's dgemm.

Matrix product based on BLAS's zgemm.

Matrix product based on BLAS's sgemm.

Matrix product based on BLAS's cgemm.

# Linear systems

Solve a real linear system (for square coefficient matrix and several right-hand sides) using the LU decomposition, based on LAPACK's dgesv. For underconstrained or overconstrained systems use `linearSolveLSR` or `linearSolveSVDR`. See also `lusR`.

Solve a complex linear system (for square coefficient matrix and several right-hand sides) using the LU decomposition, based on LAPACK's zgesv. For underconstrained or overconstrained systems use `linearSolveLSC` or `linearSolveSVDC`. See also `lusC`.

Solve a real linear system from a precomputed LU decomposition (`luR`), using LAPACK's dgetrs.

lusC :: Matrix (Complex Double) -> [Int] -> Matrix (Complex Double) -> Matrix (Complex Double)Source

Solve a real linear system from a precomputed LU decomposition (`luC`), using LAPACK's zgetrs.

Solves a symmetric positive definite system of linear equations using a precomputed Cholesky factorization obtained by `cholS`.

Solves a Hermitian positive definite system of linear equations using a precomputed Cholesky factorization obtained by `cholH`.

Least squared error solution of an overconstrained real linear system, or the minimum norm solution of an underconstrained system, using LAPACK's dgels. For rank-deficient systems use `linearSolveSVDR`.

Least squared error solution of an overconstrained complex linear system, or the minimum norm solution of an underconstrained system, using LAPACK's zgels. For rank-deficient systems use `linearSolveSVDC`.

Arguments

 :: Maybe Double rcond -> Matrix Double coefficient matrix -> Matrix Double right hand sides (as columns) -> Matrix Double solution vectors (as columns)

Minimum norm solution of a general real linear least squares problem Ax=B using the SVD, based on LAPACK's dgelss. Admits rank-deficient systems but it is slower than `linearSolveLSR`. The effective rank of A is determined by treating as zero those singular valures which are less than rcond times the largest singular value. If rcond == Nothing machine precision is used.

Arguments

 :: Maybe Double rcond -> Matrix (Complex Double) coefficient matrix -> Matrix (Complex Double) right hand sides (as columns) -> Matrix (Complex Double) solution vectors (as columns)

Minimum norm solution of a general complex linear least squares problem Ax=B using the SVD, based on LAPACK's zgelss. Admits rank-deficient systems but it is slower than `linearSolveLSC`. The effective rank of A is determined by treating as zero those singular valures which are less than rcond times the largest singular value. If rcond == Nothing machine precision is used.

# SVD

Singular values of a real matrix, using LAPACK's dgesvd with jobu == jobvt == 'N'.

Singular values of a real matrix, using LAPACK's dgesdd with jobz == 'N'.

Singular values of a complex matrix, using LAPACK's zgesvd with jobu == jobvt == 'N'.

Singular values of a complex matrix, using LAPACK's zgesdd with jobz == 'N'.

Full SVD of a real matrix using LAPACK's dgesvd.

Full SVD of a real matrix using LAPACK's dgesdd.

Full SVD of a complex matrix using LAPACK's zgesvd.

Full SVD of a complex matrix using LAPACK's zgesdd.

Thin SVD of a real matrix, using LAPACK's dgesvd with jobu == jobvt == 'S'.

Thin SVD of a real matrix, using LAPACK's dgesdd with jobz == 'S'.

Thin SVD of a complex matrix, using LAPACK's zgesvd with jobu == jobvt == 'S'.

Thin SVD of a complex matrix, using LAPACK's zgesdd with jobz == 'S'.

Singular values and all right singular vectors of a real matrix, using LAPACK's dgesvd with jobu == 'N' and jobvt == 'A'.

Singular values and all right singular vectors of a complex matrix, using LAPACK's zgesvd with jobu == 'N' and jobvt == 'A'.

Singular values and all left singular vectors of a real matrix, using LAPACK's dgesvd with jobu == 'A' and jobvt == 'N'.

Singular values and all left singular vectors of a complex matrix, using LAPACK's zgesvd with jobu == 'A' and jobvt == 'N'.

# Eigensystems

Eigenvalues and right eigenvectors of a general real matrix, using LAPACK's dgeev. The eigenvectors are the columns of v. The eigenvalues are not sorted.

Eigenvalues and right eigenvectors of a general complex matrix, using LAPACK's zgeev. The eigenvectors are the columns of v. The eigenvalues are not sorted.

Eigenvalues and right eigenvectors of a symmetric real matrix, using LAPACK's dsyev. The eigenvectors are the columns of v. The eigenvalues are sorted in descending order (use `eigS'` for ascending order).

`eigS` in ascending order

Eigenvalues and right eigenvectors of a hermitian complex matrix, using LAPACK's zheev. The eigenvectors are the columns of v. The eigenvalues are sorted in descending order (use `eigH'` for ascending order).

`eigH` in ascending order

Eigenvalues of a general real matrix, using LAPACK's dgeev with jobz == 'N'. The eigenvalues are not sorted.

Eigenvalues of a general complex matrix, using LAPACK's zgeev with jobz == 'N'. The eigenvalues are not sorted.

Eigenvalues of a symmetric real matrix, using LAPACK's dsyev with jobz == 'N'. The eigenvalues are sorted in descending order.

Eigenvalues of a hermitian complex matrix, using LAPACK's zheev with jobz == 'N'. The eigenvalues are sorted in descending order.

# LU

luR :: Matrix Double -> (Matrix Double, [Int])Source

LU factorization of a general real matrix, using LAPACK's dgetrf.

luC :: Matrix (Complex Double) -> (Matrix (Complex Double), [Int])Source

LU factorization of a general complex matrix, using LAPACK's zgetrf.

# Cholesky

Cholesky factorization of a real symmetric positive definite matrix, using LAPACK's dpotrf.

Cholesky factorization of a complex Hermitian positive definite matrix, using LAPACK's zpotrf.

Cholesky factorization of a real symmetric positive definite matrix, using LAPACK's dpotrf (`Maybe` version).

Cholesky factorization of a complex Hermitian positive definite matrix, using LAPACK's zpotrf (`Maybe` version).

# QR

QR factorization of a real matrix, using LAPACK's dgeqr2.

QR factorization of a complex matrix, using LAPACK's zgeqr2.

# Hessenberg

Hessenberg factorization of a square real matrix, using LAPACK's dgehrd.

Hessenberg factorization of a square complex matrix, using LAPACK's zgehrd.

# Schur

Schur factorization of a square real matrix, using LAPACK's dgees.

Schur factorization of a square complex matrix, using LAPACK's zgees.