MM
The Matrix Market File Format
MM is a data directory which
contains files stored in the format used by the Matrix Market for
the storage and exchange of matrices.
MM File Characteristics:

ASCII format;

allow comment lines, which begin with a percent sign;

use a "coordinate" format for sparse matrices;

use an "array" format for general dense matrices;
A file in the Matrix Market format comprises four parts:

Header line: contains an identifier, and four text fields;

Comment lines: allow a user to store information and comments;

Size line: specifies the number of rows and columns,
and the number of nonzero elements;

Data lines: specify the location of the matrix entries
(implicitly or explicitly) and their values.
The header line has the form
%%MatrixMarket object format field symmetry
The header line must be the first line of the file, and the header
line must begin with the string %%MatrixMarket. The four
fields that follow that string are

object is usually matrix, and that is the
case we will consider here. Another legal value is
vector, whose format is similar, but with some
obvious simplifications.

format is either coordinate or array;

field is either real, double, complex,
integer or pattern.

symmetry is either general (legal for real, complex,
integer or pattern fields),
symmetric (real, complex, integer or pattern),
skewsymmetric (real, complex or integer), or
hermitian (complex only).
If the field of a matrix is pattern, then
only the locations of the nonzeros will be listed. This
presumes, obviously, that we are using the coordinate
format!
If the symmetry of a matrix is symmetric or
hermitian, then only the entries on or below the
main diagonal are to be listed. If the symmetry
is skewsymmetric, then only the entries strictly
below the main diagonal are to be listed.
The comment lines, if any, should follow the header line.
The only requirement is that each comment line begin with
a percent sign.
If format was specified as array, then the
size line has the form:
m n
where

m is the number of rows in the matrix;

n is the number of columns in the matrix;
If format was specified as coordinate, then the
size line has the form:
m n nonzeros
where

m is the number of rows in the matrix;

n is the number of columns in the matrix;

nonzeros is the number of nonzero entries in the matrix
(for general symmetry), or the number of nonzero entries
on or below the diagonal (for symmetric or Hermitian symmetry),
or the number of nonzero entries below the diagonal (for
skewsymmetric symmetry).
If format was specified as array, there must
follow exactly m * n data lines, one for
each entry, listed by columns, having the form
value
where

value is the value of the entry. If the field is
complex, a pair of real numbers is required.
If format was specified as coordinate, there must
follow exactly nonzeros data lines, one for
each matrix entry that is to be listed, having the form
i j value
where

i is the row of the entry;

j is the column of the entry;

value is the value of the entry. If the field is
complex, a pair of real numbers is required. If the
value of format was pattern, then no value is
listed here; only the values of i and j occur.
Licensing:
The computer code and data files described and made available on this web page
are distributed under
the GNU LGPL license.
Reference:

http://math.nist.gov/MatrixMarket/
The Matrix Market Web Site.

Ronald Boisvert, Roldan Pozo, Karin Remington,
The Matrix Market Exchange Formats: Initial Design,
Technical Report NISTIR5935,
National Institute of Standards and Technology, December 1996.
Sample Files:

gr_900_900_crg.mm,
a 900 by 900 matrix in COORDINATE REAL GENERAL form.

gre_343_343_crg.mm,
a 343 by 343 matrix in COORDINATE REAL GENERAL form.

m_04_03_arg.mm,
a 4 by 3 matrix in ARRAY REAL GENERAL form.

m_05_05_cch.mm,
a 5 by 5 matrix in COORDINATE COMPLEX HERMITIAN form.

m_05_05_cig.mm,
a 5 by 5 matrix in COORDINATE INTEGER GENERAL form.

m_05_05_cpg.mm,
a 5 by 5 matrix in COORDINATE PATTERN GENERAL form.

m_05_05_crk.mm,
a 5 by 5 matrix in COORDINATE REAL SKEWSYMMETRIC form.

m_05_05_crg.mm,
a 5 by 5 matrix in COORDINATE REAL GENERAL form.

m_05_05_crs.mm,
a 5 by 5 matrix in COORDINATE REAL SYMMETRIC form.

wathen_29_29_adg.mm,
a 29 by 29 matrix in ARRAY DOUBLE GENERAL form.

west_67_67_crg.mm,
a 67 by 67 matrix in COORDINATE REAL GENERAL form.
You can go up one level to
the DATA page.
Last revised on 25 March 2006.