File Formats

SMAT File Format

The SMAT file format is used to store sparse matrices.  It indexes its non-zero values and has the following ASCII (plain text) format:

<row index> and <col index> specify a row and column (with the first row and col numbered as 0) and <value> indicates the value stored at the row and column. Therefore, the matrix
1 2 0 0 3
0
0
4.5
4.5
0
0
-1
7
0
0
0
0
0
0
8
0
9
0
0
0
would be stored in SMAT format as the following file.
5 5 9
0 0 1
0 1 2
0 4 3
1 2 4.5
1 3 4.5
2 1 -1
2 2 7
3 4 8
4 1 9
NOTE: Non-zero values maybe listed in any particular order.  There is no requirement that they be listed in left-to-right and top-to-bottom as in the example.  However, non-zeros are not allowed to be duplicated.  Therefore, two lines with "1 4 6" and "1 4 8" is not allowed.

Permutation Vector File Format

The permuation vector file format specifies a permutation vector.  It has the following format:

That is, each line contains a single ASCII integer between the values 0 and N-1 inclusive, where N is the number of lines in the file.  The permutation states that entry i, should be permutated to location <index>.

Label File Format

Label files contain text labels for use inside of programs, for example label for the rows of a matrix.  In this example, each row label should be stored on a different line of the file, such that line i contains the label for row i in the matrix.

Partition File Format

Partition files are used to specify how the rows or columns of a matrix should be grouped to together.  This partitioning is often found through clustering, although it can be based on anything.  Partitions are denoted by partition ids which range from 0 to number of partitions N - 1.  A partition file specifies the partition id, <id>, of row (column) i in a matrix by storing an ASCII integer <id> on line i.

Color Map File Format

A color map file specifies a range of colors for use in programs like vismatrix.  Each line represents one color by three floating point numbers in the range 0 to 1 which represent the intensity of red, green, and blue, in that order.  vismatrix uses the first colors in the file to represent low values and colors near the end of the file for high value non-zeros.