CSPARSE
A Concise Sparse Matrix Package in C
CSPARSE
is a C library which
implements a number of direct methods for sparse linear systems,
by Timothy Davis.
CSPARSE uses the Compressed Column (CC) format for storing the
sparse matrix.
The algorithms contained in CSPARSE have been chosen with
five goals in mind:
-
they must embody much of the theory behind sparse matrix algorithms,
-
they must be either asymptotically optimal in their run time
and memory usage or be fast in practice,
-
they must be concise so as to be easily understood and short
enough to print in the book,
-
they must cover a wide spectrum of matrix operations,
-
they must be accurate and robust.
The focus is on direct methods; iterative methods and solvers for
eigenvalue problems are beyond the scope of this package.
Languages:
CSPARSE is available in
a C version.
Related Data and Programs:
CC,
a data directory which
contains examples of the Compressed Column (CC)
sparse matrix file format;
CG_RC,
a C library which
implements the conjugate gradient method for solving
a positive definite sparse linear system A*x=b, using reverse communication.
CR,
a data directory which
contains examples of the Compressed Row (CR)
sparse matrix file format;
MGMRES,
a C library which
applies the restarted GMRES algorithm
to solve a sparse linear system.
MM_IO,
a C library which
reads and writes sparse linear
systems stored in the Matrix Market format.
ST,
a data directory which
contains examples and an explanation of the Sparse Triplet
file format for sparse matrices.
SUPERLU,
C programs which
illustrate how to use the SUPERLU library,
which applies a fast direct solution method to solve
sparse linear systems,
by James Demmel, John Gilbert, and Xiaoye Li.
UMFPACK,
C programs which
illustrate how to solve a sparse linear system by calling
the C library UMFPACK, by Timothy Davis.
Author:
Timothy Davis
License:
CSPARSE: a Concise Sparse matrix package.
Copyright (c) 2006, Timothy A. Davis.
http://www.cise.ufl.edu/research/sparse/CSparse
CSPARSE is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
CSPARSE is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this Module; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Reference:
-
Timothy Davis,
Direct Methods for Sparse Linear Systems,
SIAM, 2006,
ISBN: 0898716136,
LC: QA188.D386.
Source Code:
Examples and Tests:
csparse_demo1 reads an ST matrix from a file and
performs basis matrix operations.
csparse_demo2 reads an ST matrix from a file and
solves a linear system.
csparse_demo3 reads an ST matrix from a file,
solves a linear system, and performs an update/downdate.
List of Routines:
-
CS_ADD computes C = alpha*A + beta*B for sparse A and B;
-
CS_AMD approximate minimum degree;
-
CS_CHOL sparse Cholesky;
-
CS_CHOLSOL x=A\b using sparse Cholesky;
-
CS_COUNTS column counts for Cholesky and QR;
-
CS_CUMSUM cumulative sum;
-
CS_DFS depth-first-search;
-
CS_DMPERM Dulmage-Mendelsohn permutation;
-
CS_DROPTOL drop small entries from a sparse matrix;
-
CS_DROPZEROS drop zeros from a sparse matrix;
-
CS_DUPL remove (and sum) duplicates;
-
CS_ENTRY add an entry to a triplet matrix;
-
CS_ETREE find elimination tree;
-
CS_FKEEP drop entries from a sparse matrix;
-
CS_GAXPY sparse matrix times dense matrix;
-
CS_HAPPLY apply Householder reflection;
-
CS_HOUSE compute Householder reflection;
-
CS_IPVEC x(p)=b;
-
CS_LOAD load a sparse matrix from a file;
-
CS_LSOLVE x=L\b;
-
CS_LTSOLVE x=L'\b;
-
CS_LU sparse LU factorization;
-
CS_LUSOL x=A\b using sparse LU factorization;
-
CS_MALLOC memory manager;
-
CS_MAXTRANS maximum transveral (permutation for
zero-free diagonal);
-
CS_MULTIPLY sparse matrix multiply;
-
CS_NORM sparse matrix norm;
-
CS_PERMUTE permute a sparse matrix;
-
CS_PINV invert a permutation vector;
-
CS_POST postorder an elimination tree;
-
CS_PRINT print a sparse matrix;
-
CS_PVEC x=b(p);
-
CS_QR sparse QR;
-
CS_QRSOL solve a least-squares problem;
-
CS_REACH find nonzero pattern of x=L\b for sparse L and b;
-
CS_SCATTER scatter a sparse vector;
-
CS_SCC strongly-connected components;
-
CS_SCHOL symbolic Cholesky;
-
CS_SPLSOLVE x=L\b where L, x, and b are all sparse;
-
CS_SQR symbolic QR (also can be used for LU);
-
CS_SYMPERM symmetric permutation of a sparse matrix;
-
CS_TDFS depth-first-search of a tree;
-
CS_TRANSPOSE transpose a sparse matrix;
-
CS_TRIPLET convert a triplet form to compressed-column form;
-
CS_UPDOWN sparse rank-1 Cholesky update/downdate;
-
CS_USOLVE x=U\b;
-
CS_UTIL various utilities (allocate/free matrices,
workspace, etc);
-
CS_UTSOLVE x=U'\b;
You can go up one level to
the C source codes.
Last revised on 10 March 2006.