linalg 1.6.1
A linear algebra library that provides a user-friendly interface to several BLAS and LAPACK routines.
|
Provides an immutable interface to many of the core linear algebra routines in this library. The intent is to allow for ease of use in situations where memory allocation, or absolute speed are of lesser importance to code readability. More...
Data Types | |
type | eigen_results |
Defines a container for the output of an Eigen analysis of a square matrix. More... | |
type | lu_results |
Defines a container for the output of an LU factorization. More... | |
type | lu_results_cmplx |
Defines a container for the output of an LU factorization. More... | |
interface | mat_eigen |
Computes the eigenvalues and eigenvectors (right) of a general N-by-N matrix. More... | |
interface | mat_lu |
Computes the LU factorization of a square matrix. Notice, partial row pivoting is utilized. More... | |
interface | mat_mult_diag |
Computes the matrix operation: C = A * B, where A is a diagonal matrix. More... | |
interface | mat_mult_lower_tri |
Computes the matrix operation C = A * B, where A is a lower triangular matrix. More... | |
interface | mat_mult_upper_tri |
Computes the matrix operation C = A * B, where A is an upper triangular matrix. More... | |
interface | mat_solve_lower_tri |
Solves the lower triangular system A X = B, where A is a lower triangular matrix. More... | |
interface | mat_solve_upper_tri |
Solves the upper triangular system A X = B, where A is an upper triangular matrix. More... | |
type | qr_results |
Defines a container for the output of a QR factorization. More... | |
type | qr_results_cmplx |
Defines a container for the output of a QR factorization. More... | |
type | svd_results |
Defines a container for the output of a singular value decomposition of a matrix. More... | |
type | svd_results_cmplx |
Defines a container for the output of a singular value decomposition of a matrix. More... | |
Functions/Subroutines | |
real(real64) function, dimension(size(a, 1), size(a, 2)), public | mat_rank1_update (a, x, y) |
Performs the rank-1 update to matrix A such that: \( B = X Y^T + A \), where \( A \) is an M-by-N matrix, \( X \) is an M-element array, and \( Y \) is an N-element array. More... | |
real(real64) function, public | mat_det (a) |
Computes the determinant of a square matrix. More... | |
type(qr_results) function, public | mat_qr (a, pvt) |
Computes the QR factorization of an M-by-N matrix. column pivoting can be used by this routine. More... | |
type(qr_results) function, public | mat_qr_rank1_update (q, r, x, y) |
Computes the rank-1 update of a QR-factored system. More... | |
type(svd_results) function, public | mat_svd (a) |
Computes the singular value decomposition of an M-by-N matrix. More... | |
real(real64) function, dimension(size(a, 1), size(a, 2)), public | mat_cholesky (a, upper) |
Computes the Cholesky factorization of a positive-definite matrix. More... | |
real(real64) function, dimension(size(a, 1), size(a, 2)), public | mat_cholesky_rank1_update (a, x) |
Computes the rank 1 update to a Cholesky factored matrix. More... | |
real(real64) function, dimension(size(a, 1), size(a, 2)), public | mat_cholesky_rank1_downdate (a, x) |
Computes the rank 1 downdate to a Cholesky factored matrix. More... | |
real(real64) function, dimension(size(a, 2), size(a, 1)), public | mat_inverse (a) |
Computes the inverse of a square matrix. More... | |
real(real64) function, dimension(size(a, 2), size(a, 1)), public | mat_pinverse (a) |
Computes the Moore-Penrose pseudo-inverse of a M-by-N matrix. More... | |
pure real(real64) function, dimension(n, n), public | identity (n) |
Creates an N-by-N identity matrix. More... | |
Provides an immutable interface to many of the core linear algebra routines in this library. The intent is to allow for ease of use in situations where memory allocation, or absolute speed are of lesser importance to code readability.
pure real(real64) function, dimension(n, n), public linalg_immutable::identity | ( | integer(int32), intent(in) | n | ) |
Creates an N-by-N identity matrix.
[in] | n | The dimension of the matrix. |
Definition at line 1021 of file linalg_immutable.f90.
real(real64) function, dimension(size(a, 1), size(a, 2)), public linalg_immutable::mat_cholesky | ( | real(real64), dimension(:,:), intent(in) | a, |
logical, intent(in), optional | upper | ||
) |
Computes the Cholesky factorization of a positive-definite matrix.
[in] | a | The M-by-M positive definite matrix to factor. |
[in] | upper | An optional input that can be used to determine if the upper triangular factorization should be computed such that A = R**T * R, or if the lower triangular facotrization should be computed such that A = L * L**T. The default is true such that the upper triangular form is computed. |
Definition at line 714 of file linalg_immutable.f90.
real(real64) function, dimension(size(a, 1), size(a, 2)), public linalg_immutable::mat_cholesky_rank1_downdate | ( | real(real64), dimension(:,:), intent(in) | a, |
real(real64), dimension(:), intent(in) | x | ||
) |
Computes the rank 1 downdate to a Cholesky factored matrix.
[in] | a | The M-by-M upper triangular Cholesky factored matrix to downdate. |
[in] | x | The M-element downdate array. |
Definition at line 759 of file linalg_immutable.f90.
real(real64) function, dimension(size(a, 1), size(a, 2)), public linalg_immutable::mat_cholesky_rank1_update | ( | real(real64), dimension(:,:), intent(in) | a, |
real(real64), dimension(:), intent(in) | x | ||
) |
Computes the rank 1 update to a Cholesky factored matrix.
[in] | a | The M-by-M upper triangular Cholesky factored matrix to update. |
[in] | x | The M-element update array. |
Definition at line 737 of file linalg_immutable.f90.
real(real64) function, public linalg_immutable::mat_det | ( | real(real64), dimension(:,:), intent(in) | a | ) |
Computes the determinant of a square matrix.
[in] | a | The N-by-N matrix on which to operate. |
Definition at line 508 of file linalg_immutable.f90.
real(real64) function, dimension(size(a, 2), size(a, 1)), public linalg_immutable::mat_inverse | ( | real(real64), dimension(:,:), intent(in) | a | ) |
Computes the inverse of a square matrix.
[in] | a | The M-by-M matrix to invert. |
Definition at line 779 of file linalg_immutable.f90.
real(real64) function, dimension(size(a, 2), size(a, 1)), public linalg_immutable::mat_pinverse | ( | real(real64), dimension(:,:), intent(in) | a | ) |
Computes the Moore-Penrose pseudo-inverse of a M-by-N matrix.
[in] | a | The M-by-N matrix to invert. |
Definition at line 794 of file linalg_immutable.f90.
type(qr_results) function, public linalg_immutable::mat_qr | ( | real(real64), dimension(:,:), intent(in) | a, |
logical, intent(in), optional | pvt | ||
) |
Computes the QR factorization of an M-by-N matrix. column pivoting can be used by this routine.
[in] | a | The M-by-N matrix to factor. |
[in] | pvt | An optional value that, if supplied, can be used to turn on column pivoting. The default value is false, such that no column pivoting is utilized. |
Definition at line 591 of file linalg_immutable.f90.
type(qr_results) function, public linalg_immutable::mat_qr_rank1_update | ( | real(real64), dimension(:,:), intent(in) | q, |
real(real64), dimension(:,:), intent(in) | r, | ||
real(real64), dimension(:), intent(in) | x, | ||
real(real64), dimension(:), intent(in) | y | ||
) |
Computes the rank-1 update of a QR-factored system.
[in] | q | The M-by-M orthogonal matrix Q from the factorization of the original system. |
[in] | r | The M-by-N upper trapezoidal matrix R from the factorization of the original system. |
[in] | x | The M-element update vector. |
[in] | y | The N-element update vector. |
Definition at line 637 of file linalg_immutable.f90.
real(real64) function, dimension(size(a, 1), size(a, 2)), public linalg_immutable::mat_rank1_update | ( | real(real64), dimension(:,:), intent(in) | a, |
real(real64), dimension(:), intent(in) | x, | ||
real(real64), dimension(:), intent(in) | y | ||
) |
Performs the rank-1 update to matrix A such that: \( B = X Y^T + A \), where \( A \) is an M-by-N matrix, \( X \) is an M-element array, and \( Y \) is an N-element array.
[in] | a | The M-by-N matrix A. |
[in] | x | The M-element array X. |
[in] | y | The N-element array Y. |
Definition at line 204 of file linalg_immutable.f90.
type(svd_results) function, public linalg_immutable::mat_svd | ( | real(real64), dimension(:,:), intent(in) | a | ) |
Computes the singular value decomposition of an M-by-N matrix.
[in] | a | The M-by-N matrix to factor. |
Definition at line 673 of file linalg_immutable.f90.