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:
- Line 1: <number of rows> <number of cols> <number of non-zeros>
- Line 2 to (number of nrows+1): <row index> <col index> <value>
| 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 |
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 9NOTE: 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:
- For each line i: <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.