hmatrix-0.5.1.1: Linear algebra and numerical computations

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

Numeric.LinearAlgebra.LAPACK

Description

Wrappers for a few LAPACK functions (http://www.netlib.org/lapack).

Synopsis

# Documentation

Matrix product based on BLAS's dgemm.

Matrix product based on BLAS's zgemm.

Wrapper for LAPACK's dgesvd, which computes the full svd decomposition of a real matrix.

`(u,s,v)=full svdR m` so that `m=u <> s <> trans v`.

Wrapper for LAPACK's dgesvd, which computes the full svd decomposition of a real matrix.

`(u,s,v)=full svdRdd m` so that `m=u <> s <> trans v`.

Wrapper for LAPACK's zgesvd, which computes the full svd decomposition of a complex matrix.

`(u,s,v)=full svdC m` so that `m=u <> comp s <> trans v`.

Wrapper for LAPACK's zgeev, which computes the eigenvalues and right eigenvectors of a general complex matrix:

if `(l,v)=eigC m` then `m <> v = v <> diag l`.

The eigenvectors are the columns of v. The eigenvalues are not sorted.

Wrapper for LAPACK's dgeev, which computes the eigenvalues and right eigenvectors of a general real matrix:

if `(l,v)=eigR m` then `m <> v = v <> diag l`.

The eigenvectors are the columns of v. The eigenvalues are not sorted.

Wrapper for LAPACK's dsyev, which computes the eigenvalues and right eigenvectors of a symmetric real matrix:

if `(l,v)=eigSl m` then `m <> v = v <> diag l`.

The eigenvectors are the columns of v. The eigenvalues are sorted in descending order (use eigS' for ascending order).

Wrapper for LAPACK's zheev, which computes the eigenvalues and right eigenvectors of a hermitian complex matrix:

if `(l,v)=eigH m` then `m <> s v = v <> diag l`.

The eigenvectors are the columns of v. The eigenvalues are sorted in descending order (use eigH' for ascending order).

Wrapper for LAPACK's dgesv, which solves a general real linear system (for several right-hand sides) internally using the lu decomposition.

Wrapper for LAPACK's zgesv, which solves a general complex linear system (for several right-hand sides) internally using the lu decomposition.

Wrapper for LAPACK's dgels, which obtains the least squared error solution of an overconstrained real linear system or the minimum norm solution of an underdetermined system, for several right-hand sides. For rank deficient systems use `linearSolveSVDR`.

Wrapper for LAPACK's zgels, which obtains the least squared error solution of an overconstrained complex linear system or the minimum norm solution of an underdetermined system, for several right-hand sides. 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)

Wrapper for LAPACK's dgelss, which obtains the minimum norm solution to a real linear least squares problem Ax=B using the svd, for several right-hand sides. 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)

Wrapper for LAPACK's zgelss, which obtains the minimum norm solution to a complex linear least squares problem Ax=B using the svd, for several right-hand sides. 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.

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

Wrapper for LAPACK's dgetrf, which computes a LU factorization of a general real matrix.

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

Wrapper for LAPACK's zgees, which computes a Schur factorization of a square complex matrix.

Wrapper for LAPACK's dgetrs, which solves a general real linear system (for several right-hand sides) from a precomputed LU decomposition.

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

Wrapper for LAPACK's zgetrs, which solves a general real linear system (for several right-hand sides) from a precomputed LU decomposition.

Wrapper for LAPACK's dpotrf, which computes the Cholesky factorization of a real symmetric positive definite matrix.

Wrapper for LAPACK's zpotrf, which computes the Cholesky factorization of a complex Hermitian positive definite matrix.

Wrapper for LAPACK's dgeqr2, which computes a QR factorization of a real matrix.

Wrapper for LAPACK's zgeqr2, which computes a QR factorization of a complex matrix.

Wrapper for LAPACK's dgehrd, which computes a Hessenberg factorization of a square real matrix.

Wrapper for LAPACK's zgehrd, which computes a Hessenberg factorization of a square complex matrix.

Wrapper for LAPACK's dgees, which computes a Schur factorization of a square real matrix.

Wrapper for LAPACK's zgees, which computes a Schur factorization of a square complex matrix.