Math::MatrixSparse - a pure Perl module implementing sparse matrices.

Math::MatrixSparse is a module implementing naive sparse matrices.  Its
syntax is designed to partially overlap with Math::MatrixReal where
possible and reasonable.

Basic matrix operations are present, including addition, subtraction,
scalar multiplication, matrix multiplication, transposition,
and exponentiation.

Three methods of solving systems iteratively are available, including
Jacobi, Gauss-Seidel, and Symmetric Over-Relaxation. 

Real-valued matrices can be read from files in the Matrix Market and
Harwell Boeing formats, and written in the Matrix Market format. In
addition, they can be read from a given string.

Certain special types of matrices are understood, but not optimized
for, such as upper and lower triangular, diagonal, symmetric,
skew-symmetric, positive, negative, and pattern.  Methods are
available to determine the properties of a given matrix.

Individual rows, columns, and diagonals of matrices can be obtained,
as can the upper and lower triangular, symmetric, skew symmetric,
positive and negative portions.


To install this module type the following:

   perl Makefile.PL
   make test
   make install


This module requires no other modules besides those that come with 


Math::MatrixSparse was originally developed by Jacob C. Kesinger. However, as
he seems to have orphaned the module, I (Gabor) took over the maintenance
(unfortunately, out of CPAN), and I actively develop it. At the moment,
Math::MatrixSparse can serve as a drop-in-replacement for
Math::MatrixReal. Also, it provides the base matrix class for Math::GLPK.


Copyright (C) 2002 Jacob C. Kesinger (
              2004 Gabor Retvari (

This module is distributed under the same terms as perl, i.e.
Math::MatrixSparse may be copied only under the terms of either the
Artistic License or the GNU General Public License, which may be found
in the Perl 5 source kit.

Download Math::MatrixSparse