LINPLUS
Linear Algebra Utilities
LINPLUS is a C library
which carries out a small number of linear algebra operations,
inspired by LINPACK and LAPACK.
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:
-
C83 - Complex double precision tridiagonal;
-
C8CI - Complex double precision circulant;
-
C8GE - Complex double precision general;
-
C8TO - Complex double precision Toeplitz;
-
R83 - Real double precision tridiagonal;
-
R83P - Real double precision tridiagonal periodic;
-
R85 - Real double precision pentadiagonal;
-
R8BB - Real double precision border-banded;
-
R8BLT - Real double precision banded lower triangular matrix;
-
R8BTO - Real double precision block Toeplitz;
-
R8BUT - Real double precision banded upper triangular matrix;
-
R8CB - Real double precision compact band;
-
R8CBB - Real double precision compact border-banded;
-
R8CC - Real double precision compressed column sparse
= Harwell Boeing Unsymmetric Assembled format
= MATLAB sparse format;
-
R8CI - Real double precision circulant;
-
R8GB - Real double precision general band,
used by LINPACK and LAPACK;
-
R8GD - Real double precision general diagonal;
-
R8GE - Real double precision general, used by LINPACK and LAPACK;
-
R8LT - Real double precision lower triangular;
-
R8NCF - Real double precision Nonsymmetric Coordinate Format
(one of the formats used by NSPCG);
-
R8PBL - Real double precision positive-definite symmetric band
matrix, store diagonal and lower triangle;
-
R8PBU - Real double precision positive-definite symmetric band
matrix, store diagonal and upper triangle;
-
R8PO - Real double precision positive-definite symmetric,
used by LINPACK and LAPACK;
-
R8PP - Real double precision positive-definite symmetric Packed,
used by LINPACK and LAPACK;
-
R8S3 - Real double precision sparse matrix stored by row,
column, value (used by SLAP/DLAP, symmetric or nonsymmetric);
-
R8SD - Real double precision symmetric diagonal;
-
R8SM - Real double precision Sherman Morrison system A - u * v';
-
R8SP - Real double precision sparse matrix stored by row,
column, value (used by CSPARSE ("sparse triplet"),
SLAP/DLAP (nonsymmetric SLAP triad format), MATLAB,
and SPARSEKIT ("COO" format));
-
R8SR - Real double precision sparse matrix stored by rows;
-
R8SS - Real double precision symmetric skyline;
-
R8STO - Real double precision symmetric Toeplitz;
-
R8TO - Real double precision Toeplitz;
-
R8UT - Real double precision upper triangular;
-
R8VEC - Real double precision vector, which in some cases
is used to store a matrix;
-
R8VM - Real double precision Vandermonde;
Licensing:
The computer code and data files described and made available on this web page
are distributed under
the GNU LGPL license.
Related Data and Programs:
BLAS1
is a C library which
carries out basic linear algebra routines.
CSPARSE
is a C library which
carries out the direct solution of sparse linear systems.
DLAP
is a FORTRAN90 library which
contains iterative linear algebra routines for sparse systems.
DSP
is a data format which
can be used to store a DSP matrix in a file.
GSL
is a C++ library, the Gnu Scientific Library, which
includes many linear algebra routines.
HB_TO_ST
is a FORTRAN77 program which
converts the sparse matrix information stored as a Harwell-Boeing file into a
sparse triplet file.
HBSMC
is a dataset directory which
contains the Harwell-Boeing Sparse Matrix Collection
of large sparse matrices.
ITPACK
is a FORTRAN90 library which
carries out the iterative solution of large sparse linear systems.
LAPACK
is a FORTRAN90 library which
contains many linear algebra routines.
LINPACK
is a C++ library which
contains linear algebra routines.
LINPACK_BENCH
is a C++ program which
measures the time taken by LINPACK to solve a
particular linear system.
LINPLUS is available in
a C version and
a C++ version and
a FORTRAN77 version and
a FORTRAN90 version and
a MATLAB version.
MGMRES
is a C library which
applies the restarted GMRES algorithm
to solve a sparse linear system.
MM_IO
is a FORTRAN90 library which
reads and writes
files of sparse matrix information stored in the Matrix Market format.
NSPCG
is a FORTRAN90 library which
solves sparse systems of linear equations using the nonsymmetric
sparse conjugate gradient method.
PETSC
is a C library which
is suitable for use in parallel programming,
which includes linear algebra routines.
SPARSE_CC
is a data directory which
contains a description and examples of the CC format,
("compressed column") for storing a sparse matrix,
including a way to write the matrix as a set of three files.
SPARSE_CR
is a data directory which
contains a description and examples of the CR format,
("compressed row") for storing a sparse matrix,
including a way to write the matrix as a set of three files.
SPARSEKIT
is a FORTRAN90 library which
carries out operations
on sparse matrices, including conversion between various formats.
SUPER_LU
is a C library which
implements some very fast solvers
for systems of sparse linear equations.
TEMPLATES
is a MATLAB library which
implements
various iterative methods for solving a linear system.
TEST_MAT
is a C library which
defines test matrices, some of
which have known determinants, eigenvalues and eigenvectors,
inverses and so on.
Reference:
-
Edward Anderson, Zhaojun Bai, Christian Bischof, Susan Blackford,
James Demmel, Jack Dongarra, Jeremy Du Croz, Anne Greenbaum,
Sven Hammarling, Alan McKenney, Danny Sorensen,
LAPACK User's Guide,
Third Edition,
SIAM, 1999,
ISBN: 0898714478,
LC: QA76.73.F25L36
-
Frank Beckman,
The Solution of Linear Equations by the Conjugate Gradient Method,
in Mathematical Methods for Digital Computers,
edited by John Ralston, Herbert Wilf,
Wiley, 1967,
ISBN: 0471706892.
-
Paul Bratley, Bennett Fox, Linus Schrage,
A Guide to Simulation,
Second Edition,
Springer, 1987,
ISBN: 0387964673.
-
Ward Cheney, David Kincaid,
Numerical Mathematics and Computing,
Brooks-Cole Publishing, 2004,
ISBN: 0534201121.
-
Philip Davis,
Circulant Matrices,
Second Edition,
Chelsea, 1994,
ISBN: 0828403384,
LC: QA188.D37.
-
Jack Dongarra, Jim Bunch, Cleve Moler, Pete Stewart,
LINPACK User's Guide,
SIAM, 1979,
ISBN13: 978-0-898711-72-1,
LC: QA214.L56.
-
Iain Duff, Roger Grimes, John Lewis,
User's Guide for the Harwell-Boeing Sparse Matrix Collection,
October 1992.
-
Bennett Fox,
Algorithm 647:
Implementation and Relative Efficiency of Quasirandom
Sequence Generators,
ACM Transactions on Mathematical Software,
Volume 12, Number 4, December 1986, pages 362-376.
-
Gene Golub, Charles VanLoan,
Matrix Computations,
Third Edition,
Johns Hopkins, 1996,
ISBN: 0-8018-4513-X,
LC: QA188.G65.
-
Roger Hockney,
A fast direct solution of Poisson's equation using Fourier Analysis,
Journal of the ACM,
Volume 12, Number 1, pages 95-113, January 1965.
-
David Kahaner, Cleve Moler, Steven Nash,
Numerical Methods and Software,
Prentice Hall, 1989,
ISBN: 0-13-627258-4,
LC: TA345.K34.
-
Charles Lawson, Richard Hanson, David Kincaid, Fred Krogh,
Algorithm 539: Basic Linear Algebra Subprograms for Fortran Usage,
ACM Transactions on Mathematical Software,
Volume 5, Number 3, September 1979, pages 308-323.
-
Albert Nijenhuis, Herbert Wilf,
Combinatorial Algorithms for Computers and Calculators,
Second Edition,
Academic Press, 1978,
ISBN: 0-12-519260-6,
LC: QA164.N54.
Source Code:
Examples and Tests:
List of Routines:
-
I4_LOG_10 returns the integer part of the logarithm base 10 of an I4.
-
I4_MAX returns the maximum of two I4's.
-
I4_MIN returns the smaller of two I4's.
-
I4_POWER returns the value of I^J.
-
R8_ABS returns the absolute value of an R8.
-
R8_IS_INT is 1 if an R8 represents an integer value.
-
R8_MAX returns the maximum of two R8's.
-
R8_MIN returns the minimum of two R8's.
-
R8_SIGN returns the sign of an R8.
-
R8_SWAP switches two R8's.
-
R8_UNIFORM returns a scaled pseudorandom R8.
-
R8_UNIFORM_01 returns a unit pseudorandom R8.
-
R83_CR_FA decomposes a real tridiagonal matrix using cyclic reduction.
-
R83_CR_SL solves a real linear system factored by R83_CR_FA.
-
R83_GS_SL solves a R83 system using Gauss-Seidel iteration.
-
R83_INDICATOR sets up a R83 indicator matrix.
-
R83_JAC_SL solves a R83 system using Jacobi iteration.
-
R83_MXV multiplies a R83 matrix times a vector.
-
R83_NP_DET: determinant of a tridiagonal system factored by R83_NP_FA.
-
R83_NP_FA factors a R83 system without pivoting.
-
R83_NP_FS factors and solves a R83 system.
-
R83_NP_ML computes Ax or xA, where A has been factored by R83_NP_FA.
-
R83_NP_SL solves a R83 system factored by R83_NP_FA.
-
R83_PRINT prints a R83 matrix.
-
R83_PRINT_SOME prints some of a R83 matrix.
-
R83_RANDOM randomizes a R83 matrix.
-
R83_TO_R8GE copies a R83 matrix to a R8GE matrix.
-
R83_VXM multiplies a vector times a R83 matrix.
-
R83_ZERO zeros a R83 matrix.
-
R83NP_FS factors and solves an R83NP system.
-
R83P_DET computes the determinant of a matrix factored by R83P_FA.
-
R83P_FA factors a R83P matrix.
-
R83P_INDICATOR sets up a R83P indicator matrix.
-
R83P_ML computes A * x or x * A, where A has been factored by R83P_FA.
-
R83P_MXV multiplies a R83P matrix times a vector.
-
R83P_PRINT prints a R83P matrix.
-
R83P_PRINT_SOME prints some of a R83P matrix.
-
R83P_RANDOM randomizes a R83P matrix.
-
R83P_SL solves a R83P system factored by R83P_FA.
-
R83P_TO_R8GE copies a R83P matrix to a R8GE matrix.
-
R83P_VXM multiplies a vector times a R83P matrix.
-
R83P_ZERO zeros a R83P matrix.
-
R8VEC_INDICATOR_NEW sets an R8VEC to the indicator vector {1,2,3...}.
-
R8VEC_PRINT prints an R8VEC.
-
R8VEC_PRINT_SOME prints "some" of an R8VEC.
-
R8VEC_UNIFORM returns a scaled pseudorandom R8VEC.
-
S_LEN_TRIM returns the length of a string to the last nonblank.
-
TIMESTAMP prints the current YMDHMS date as a time stamp.
You can go up one level to
the C source codes.
Last revised on 13 June 2009.