LINPLUS - Linear Algebra Utilities
LINPLUS is a collection of linear algebra routines, inspired by
LINPACK. The routines are primarily organized by the storage format of the
matrix they operate on. Some of these formats were defined by LINPACK,
while others are new; I just made them up when I had to solve problems
involving such matrices. The formats include:
-
C3 - Complex tridiagonal;
-
CCI - Complex circulant;
-
CGE - Complex general;
-
CTO - Complex Toeplitz;
-
S3 - Real tridiagonal;
-
S3P - Real tridiagonal periodic;
-
S5 - Real pentadiagonal;
-
SBB - Real border-banded;
-
SBTO - Real block Toeplitz;
-
SCB - Real compact band;
-
SCBB - Real compact border-banded;
-
SCI - Real circulant;
-
SGB - Real general band;
-
SGD - Real general diagonal;
-
SGE - Real general;
-
SGT - Real general tridiagonal;
-
SLT - Real lower triangular;
-
SPB - Real positive-definite symmetric band;
-
SPO - Real positive-definite symmetric;
-
SPP - Real positive-definite symmetric Packed;
-
SSD - Real symmetric diagonal;
-
SSM - Real Sherman Morrison system A - u * Transpose ( v );
-
SSS - Real symmetric skyline;
-
SSTO - Real symmetric Toeplitz;
-
STO - Real Toeplitz;
-
SUT - Real upper triangular;
-
SVM - Real Vandermonde;
Files you may copy include:
The list of routines includes:
-
C_LE_L2 := X <= Y for complex values, and the L2 norm.
-
C_SWAP swaps two complex values.
-
C3_CHECK checks the dimensions of a complex tridiagonal matrix.
-
C3_CR_FA decomposes a complex tridiagonal matrix via cyclic reduction.
-
C3_CR_SL solves a complex linear system factored by C3_CR_FA.
-
C3_JAC_SL tries to solve a complex tridiagonal system using Jacobi iteration.
-
C3_MXV multiplies a complex tridiagonal matrix times a vector.
-
C3_NP_DET returns the determinant of a complex tridiagonal system factored by C3_NP_FA.
-
C3_NP_FA factors a complex tridiagonal system without pivoting.
-
C3_NP_ML computes A * x or x * A, where A has been factored by C3_NP_FA.
-
C3_NP_SL solves a tridiagonal system factored by C3_NP_FA.
-
C3_PRINT prints a complex tridiagonal matrix.
-
C3_PRINT_SOME prints some of a complex tridiagonal matrix.
-
C3_RANDOM returns a random complex tridiagonal matrix.
-
C3_TO_CGE copies a complex tridiagonal matrix into a general matrix.
-
C3_VXM multiplies the transpose of a complex tridiagonal matrix times a vector.
-
CCI_EVAL returns the eigenvalues of a complex circulant matrix.
-
CCI_MXV multiplies a complex circulant matrix times a vector.
-
CCI_PRINT prints a complex circulant matrix.
-
CCI_PRINT_SOME prints some of a complex circulant matrix.
-
CCI_RANDOM randomizes a complex circulant matrix.
-
CCI_SL solves the complex circulant system A * x = b.
-
CCI_TO_CGE copies a complex circulant matrix into a general matrix.
-
CCI_VXM multiplies a vector times a complex circulant matrix.
-
CGE_CHECK checks the dimensions of a complex general matrix.
-
CTO_MXV multiplies a complex Toeplitz matrix times a vector.
-
CTO_PRINT prints a complex Toeplitz matrix.
-
CTO_PRINT_SOME prints some of a complex Toeplitz matrix.
-
CTO_RANDOM randomizes a complex Toeplitz matrix.
-
CTO_SL solves the complex Toeplitz system A * X = B.
-
CTO_TO_CGE copies a complex Toeplitz matrix into a general matrix.
-
CTO_VXM multiplies a vector times a complex Toeplitz matrix.
-
CVEC_IDENTITY sets a complex vector to a sort of identity vector.
-
CVEC_PRINT prints a complex vector, with an optional title.
-
CVEC_PRINT_SOME prints some of a complex vector.
-
CVEC_RANDOM returns a random complex vector in a given range.
-
CVEC_SORT_A2 ascending sorts a complex array by L2 norm.
-
CVEC_UNITY returns the N roots of unity.
-
HILB_INV returns the inverse of the Hilbert matrix.
-
I_RANDOM returns a random integer in a given range.
-
R_IS_INT determines if a real number represents an integer value.
-
R_RANDOM returns a random real in a given range.
-
R_SWAP switches two real values.
-
RCOL_SWAP swaps columns I and J of a real array of column data.
-
RMAT_DIAG_ADD_SCALAR adds a scalar to the diagonal of a matrix.
-
RMAT_DIAG_GET_VECTOR gets the value of the diagonal of a matrix.
-
RMAT_DIAG_SET_SCALAR sets the diagonal of a matrix to a scalar value.
-
RMAT_RANDOM returns a matrix of uniform random values between AHI and ALO.
-
RROW_SWAP swaps two rows of a table.
-
RVEC2_PRINT_SOME prints some of two real vectors.
-
RVEC_IDENTITY sets a real vector to the identity vector A(I)=I.
-
RVEC_PRINT prints a real vector, with an optional title.
-
RVEC_PRINT_SOME prints some of a real vector.
-
RVEC_RANDOM returns a random real vector in a given range.
-
S3_CHECK checks the dimensions of a real tridiagonal matrix.
-
S3_CR_FA decomposes a real tridiagonal matrix using cyclic reduction.
-
S3_CR_SL solves a real linear system factored by S3_CR_FA.
-
S3_GS_SL tries to solve a tridiagonal system using Gauss-Seidel iteration.
-
S3_JAC_SL tries to solve a tridiagonal system using Jacobi iteration.
-
S3_MXV multiplies a tridiagonal matrix times a vector.
-
S3_NP_DET returns the determinant of a tridiagonal system factored by S3_NP_FA.
-
S3_NP_FA factors a tridiagonal system without pivoting.
-
S3_NP_FS factors and solves a tridiagonal linear system.
-
S3_NP_ML computes A * x or x * A, where A has been factored by S3_NP_FA.
-
S3_NP_SL solves a tridiagonal system factored by S3_NP_FA.
-
S3_PRINT prints a tridiagonal matrix.
-
S3_PRINT_SOME prints some of a tridiagonal matrix.
-
S3_RANDOM returns a random tridiagonal matrix.
-
S3_TO_SGE copies a tridiagonal matrix into a general matrix.
-
S3_VXM multiplies the transpose of a tridiagonal matrix times a vector.
-
S3_ZERO zeroes out a general tridiagonal matrix.
-
S3P_CHECK checks the dimensions of a tridiagonal periodic matrix.
-
S3P_DET computes the determinant of a matrix factored by S3P_FA.
-
S3P_FA factors a tridiagonal periodic matrix.
-
S3P_ML computes A * x or x * A, where A has been factored by S3P_FA.
-
S3P_MXV computes A * x, where A is a tridiagonal periodic matrix.
-
S3P_PRINT prints a periodic tridiagonal matrix.
-
S3P_PRINT_SOME prints some of a periodic tridiagonal matrix.
-
S3P_RANDOM randomizes a tridiagonal periodic matrix.
-
S3P_SL solves a tridiagonal periodic system factored by S3P_FA.
-
S3P_TO_SGE copies a tridiagonal periodic matrix into a general matrix.
-
S3P_VXM computes X*A, where A is a tridiagonal periodic matrix.
-
S3P_ZERO zeroes out a tridiagonal periodic matrix.
-
S5_CHECK checks the dimensions of a pentadiagonal matrix.
-
S5_FS factors and solves a pentadiagonal linear system.
-
S5_MXV multiplies a pentadiagonal matrix times a vector.
-
S5_PRINT_SOME prints some of a pentadiagonal matrix.
-
S5_PRINT_SOME prints some of a pentadiagonal matrix.
-
S5_RANDOM returns a random pentadiagonal matrix.
-
S5_TO_SGE copies a pentadiagonal matrix into a general matrix.
-
S5_VXM multiplies the transpose of a pentadiagonal matrix times a vector.
-
S5_ZERO zeroes a pentadiagonal matrix.
-
SBB_ADD adds a value to an entry in a border banded matrix.
-
SBB_CHECK checks the dimensions of a border banded matrix.
-
SBB_FA factors a border banded matrix.
-
SBB_GET returns an entry of a border banded matrix.
-
SBB_MXV multiplies a border banded matrix times a vector.
-
SBB_PRINT prints a border banded matrix.
-
SBB_PRINT_SOME prints some of a border banded matrix.
-
SBB_RANDOM randomizes a border banded matrix.
-
SBB_SET sets an entry of a border banded matrix.
-
SBB_SL solves a border banded linear system factored by SBB_FA.
-
SBB_TO_SGE copies a border banded matrix into a general matrix.
-
SBB_VXM multiplies a vector times a border banded matrix.
-
SBB_ZERO zeroes out a border banded matrix.
-
SBTO_MXV computes the real block Toeplitz matrix product A * X = B.
-
SBTO_PRINT prints a block Toeplitz matrix.
-
SBTO_PRINT_SOME prints some of a block Toeplitz matrix.
-
SBTO_SL solves the real block Toeplitz linear system A * X = B.
-
SBTO_TO_SGE converts a block Toeplitz matrix to a Linpack General matrix.
-
SBTO_VXM computes the real block Toeplitz matrix product X * A = B.
-
SCB_CHECK checks the dimensions of a compact band matrix.
-
SCB_DET computes the determinant of a band matrix factored by SCB_NP_FA.
-
SCB_ML computes A * x or transpose ( A ) * X, using SCB_NP_FA factors.
-
SCB_MXV computes A * x, where A is a compact band matrix.
-
SCB_NP_FA factors a real band matrix by Gaussian elimination.
-
SCB_NP_SL solves a linear system factored by SCB_NP_FA.
-
SCB_PRINT prints a compact banded matrix.
-
SCB_PRINT_SOME prints some of a compact banded matrix.
-
SCB_RANDOM randomizes a compact band matrix.
-
SCB_TO_SGE converts a compact band matrix to general matrix format.
-
SCB_VXM computes X*A, where A is a compact band matrix.
-
SCB_ZERO zeroes out a compact band matrix.
-
SCBB_ADD adds a value to an entry of a compact border banded matrix.
-
SCBB_CHECK checks the dimensions of a compact border banded matrix.
-
SCBB_FA factors a compact border banded matrix.
-
SCBB_GET returns the value of an entry of a compact border banded matrix.
-
SCBB_MXV multiplies a compact border banded matrix times a vector.
-
SCBB_PRINT prints a compact border banded matrix.
-
SCBB_PRINT_SOME prints some of a compact border banded matrix.
-
SCBB_RANDOM randomizes a compact border banded matrix.
-
SCBB_SET sets the value of an entry in a compact border banded matrix.
-
SCBB_SL solves a compact border banded system factored by SCBB_FA.
-
SCBB_TO_SGE copies a compact border banded matrix into a general matrix.
-
SCBB_VXM multiplies a vector times a compact border banded matrix.
-
SCBB_ZERO zeroes out a compact border banded matrix.
-
SCI_EVAL returns the eigenvalues of a real circulant matrix.
-
SCI_MXV multiplies a circulant matrix times a vector.
-
SCI_PRINT prints a circulant matrix.
-
SCI_PRINT_SOME prints some of a circulant matrix.
-
SCI_RANDOM randomizes a circulant matrix.
-
SCI_SL solves the system A * x = b with the circulant matrix A.
-
SCI_TO_SGE copies a circulant matrix into a general matrix.
-
SCI_VXM multiplies a vector times a circulant matrix.
-
SGB_CHECK checks the dimensions of a general band matrix.
-
SGB_DET computes the determinant of a matrix factored by SGB_FA or SGB_TRF.
-
SGB_FA factors a matrix stored in LINPACK general band storage.
-
SGB_ML computes A * x or transpose ( A ) * X, using SGB_FA factors.
-
SGB_MU computes A * x or transpose ( A ) * X, using SGB_TRF factors.
-
SGB_MXV computes A * x, where A is a general band matrix.
-
SGB_PRINT prints a banded matrix.
-
SGB_PRINT_SOME prints some of a banded matrix.
-
SGB_RANDOM randomizes a general band matrix.
-
SGB_SCAN reports the number of zeroes in a general band matrix.
-
SGB_SL solves a system factored by SGB_FA.
-
SGB_TO_SGE converts a general band matrix to general matrix format.
-
SGB_TRF performs a PLU factorization of an M by N band matrix.
-
SGB_TRS solves a linear system factored by SGB_TRF.
-
SGB_VXM computes X*A, where A is a general band matrix.
-
SGB_ZERO zeroes out a general band matrix.
-
SGD_CHECK checks the dimensions of a general diagonal matrix.
-
SGD_MXV computes A * x where A is a general diagonal matrix.
-
SGD_PRINT prints a general diagonal matrix.
-
SGD_PRINT_SOME prints some of a general diagonal matrix.
-
SGD_RANDOM randomizes a general diagonal matrix.
-
SGD_TO_SGE copies a general diagonal matrix into a general matrix.
-
SGD_VXM computes X*A where A is a general diagonal matrix.
-
SGD_ZERO zeroes out a general diagonal matrix.
-
SGE_CHECK checks the dimensions of a general matrix.
-
SGE_DET computes the determinant of a matrix factored by SGE_FA or SGE_TRF.
-
SGE_DILU produces the diagonal incomplete LU factors of a real rectangular matrix.
-
SGE_FA factors a general matrix.
-
SGE_FS factors and solves a general linear system in one step.
-
SGE_IDENTITY sets up the identity matrix in real general storage.
-
SGE_ILU produces the incomplete LU factors of a real rectangular matrix.
-
SGE_INV computes the inverse of a matrix factored by SGE_FA.
-
SGE_ML computes A * x or transpose ( A ) * x, using SGE_FA factors.
-
SGE_MU computes A * x or transpose ( A ) * x, using SGE_TRF factors.
-
SGE_MXM computes A * B = C, where A, B and C are N by N matrices.
-
SGE_MXV computes A * x, where A is a general matrix.
-
SGE_NP_DET computes the determinant of a matrix factored by SGE_NP_FA.
-
SGE_NP_FA factors a general matrix by nonpivoting Gaussian elimination.
-
SGE_NP_INV computes the inverse of a matrix factored by SGE_NP_FA.
-
SGE_NP_ML computes A * x or x * A, for a matrix factored by SGE_NP_FA.
-
SGE_NP_SL solves a system factored by SGE_NP_FA.
-
SGE_NP_TRF computes the LU factorization of a general M by N matrix.
-
SGE_NP_TRM computes A * x or x * A, for a matrix factored by SGE_NP_TRF.
-
SGE_NP_TRS solves a system of linear equations factored by SGE_NP_TRF.
-
SGE_PLU produces the PLU factors of a real rectangular matrix.
-
SGE_POLY computes the characteristic polynomial of a general matrix.
-
SGE_PRINT prints a general matrix.
-
SGE_PRINT_SOME prints some of a general matrix.
-
SGE_RANDOM randomizes a general matrix.
-
SGE_RES computes the residual vector for a linear system.
-
SGE_SL solves a system factored by SGE_FA.
-
SGE_SL_IT applies one step of iterative refinement following SGE_SL.
-
SGE_TRF computes the PLU factorization of a general M by N matrix.
-
SGE_TRS solves a system of linear equations factored by SGE_TRF.
-
SGE_VXM computes Tranpose(A) * X, where A is a general matrix.
-
SGE_ZERO zeroes out a general matrix.
-
SLT_DET computes the determinant of a lower triangular matrix.
-
SLT_INV computes the inverse of a lower triangular matrix.
-
SLT_MXV computes A * x, where A is a lower triangular matrix.
-
SLT_PRINT prints a lower triangular matrix.
-
SLT_PRINT_SOME prints some of a lower triangular matrix.
-
SLT_SL solves a lower triangular system.
-
SLT_VXM computes A' * x, where A is a lower triangular matrix.
-
SORT_HEAP_EXTERNAL externally sorts a list of items into linear order.
-
SPB_CG uses the conjugate gradient method on a symmetric banded system.
-
SPB_CHECK checks the dimensions of a positive definite symmetric band matrix.
-
SPB_DET computes the determinant of a matrix factored by SPB_FA.
-
SPB_FA factors a positive definite symmetric band matrix A.
-
SPB_ML multiplies a vector times a matrix that was factored by SPB_FA.
-
SPB_MXV multiplies a positive definite symmetric band matrix times a vector.
-
SPB_PRINT prints a symmetric banded matrix.
-
SPB_PRINT_SOME prints some of a symmetric banded matrix.
-
SPB_RANDOM randomizes a positive definite symmetric band matrix.
-
SPB_SL solves a linear system A * x = b, factored by SPB_FA.
-
SPB_SOR uses SOR iteration to solve the PDS band system A*x=b.
-
SPB_TO_SGE converts a positive definite symmetric band matrix to general matrix format.
-
SPB_ZERO zeroes out a positive definite symmetric band matrix.
-
SPO_DET computes the determinant of an SPD matrix factored by SPO_FA.
-
SPO_FA factors a real symmetric positive definite matrix.
-
SPO_INV computes the inverse of an SPD matrix factored by SPO_FA.
-
SPO_ML computes A * x = b after A has been factored by SPO_FA.
-
SPO_RANDOM randomizes a positive definite symmetric matrix.
-
SPO_SL solves an SPD system factored by SPO_FA.
-
SPP_PRINT prints a square packed matrix.
-
SPP_PRINT_SOME prints some of a square packed matrix.
-
SPP_RANDOM randomizes a positive definite symmetric packed matrix.
-
SPP_TO_SGE copies a packed matrix into a general matrix.
-
SSD_CG uses conjugate gradient on a symmetric diagonal storage matrix.
-
SSD_CHECK checks the dimensions of a symmetric diagonal storage matrix.
-
SSD_MXV computes A * x where A is a symmetric diagonal storage matrix.
-
SSD_PRINT prints a symmetric diagonal matrix.
-
SSD_PRINT_SOME prints some of a symmetric diagonal matrix.
-
SSD_RANDOM randomizes a symmetric diagonal storage matrix.
-
SSD_TO_SGE copies a symmetric diagonal storage matrix to a general matrix.
-
SSD_ZERO zeroes out a symmetric diagonal storage matrix.
-
SSM_ML multiplies a factored Sherman Morrison matrix times a vector.
-
SSM_MXV multiplies a Sherman-Morrison matrix times a vector.
-
SSM_PRINT prints a Sherman Morrison matrix.
-
SSM_PRINT_SOME prints some of a Sherman Morrison matrix.
-
SSM_RANDOM randomizes a Sherman-Morrison matrix.
-
SSM_SL solves a linear system involving a Sherman Morrison matrix.
-
SSM_TO_SGE copies a Sherman-Morrison matrix into a general storage matrix.
-
SSM_VXM multiplies a vector times a Sherman-Morrison matrix.
-
SSS_CHECK checks dimensions for symmetric skyline matrix.
-
SSS_MXV multiplies a symmetric skyline matrix times a vector.
-
SSS_PRINT prints a symmetric skyline matrix.
-
SSS_PRINT_SOME prints some of a symmetric skyline matrix.
-
SSS_RANDOM randomizes a symmetric skyline matrix.
-
SSS_TO_SGE copies a symmetric skyline matrix into a general matrix.
-
SSS_ZERO zeroes out a symmetric skyline matrix.
-
SSTO_INV computes the inverse of a real symmetric Toeplitz matrix.
-
SSTO_SL solves a linear system with a real symmetric Toeplitz matrix.
-
SSTO_YW_SL solves the Yule-Walker equations for a real symmetric Toeplitz matrix.
-
SSTO_MXV multiplies a symmetric Toeplitz matrix times a vector.
-
SSTO_PRINT prints a symmetric Toeplitz matrix.
-
STO_PRINT_SOME prints some of a Toeplitz matrix.
-
SSTO_RANDOM randomizes a symmetric Toeplitz matrix.
-
SSTO_TO_SGE copies a symmetric Toeplitz matrix into a general matrix.
-
STO_MXV multiplies a Toeplitz matrix times a vector.
-
STO_PRINT prints a Toeplitz matrix.
-
STO_PRINT_SOME prints some of a Toeplitz matrix.
-
STO_RANDOM randomizes a Toeplitz matrix.
-
STO_SL solves the real Toeplitz system A * X = B.
-
STO_TO_SGE copies a Toeplitz matrix into a general matrix.
-
STO_VXM multiplies a vector times a Toeplitz matrix.
-
SUT_DET computes the determinant of an upper triangular matrix.
-
SUT_INV computes the inverse of an upper triangular matrix.
-
SUT_MXV computes A * x, where A is an upper triangular matrix.
-
SUT_PRINT prints an upper triangular matrix.
-
SUT_PRINT_SOME prints some of an upper triangular matrix.
-
SUT_SL solves an upper triangular system.
-
SUT_VXM computes Transpose ( A ) * x, where A is an upper triangular matrix.
-
SVM_DET computes the determinant of a Vandermonde matrix.
-
SVM_MXV multiplies a Vandermonde matrix times a vector.
-
SVM_PRINT prints a Vandermonde matrix.
-
SVM_PRINT_SOME prints some of a Vandermonde matrix.
-
SVM_RANDOM randomizes a Vandermonde matrix.
-
SVM_SL solves the system A * x = b with the Vandermonde matrix A.
-
SVM_TO_SGE copies a Vandermonde matrix into a general matrix.
-
SVM_VXM multiplies a vector times a Vandermonde matrix.
Back to the FORTRAN software page.
Last revised on 29 March 2001.