The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information.... |
Home ![]() ![]() ![]() |
|
See also: Format of the matrix file | |
Format of the sparse matrix file |
|
The first line of a sparse matrix file contains the unique identifier 'SLD_sparse_matrix'. This identifier is used by LoadSparseMat to ensure that the format is correct. The next line contains the number of non-zero elements of the sparse matrix. The next two lines contain the lowest and highest column and row indices. All other lines contain the matrix data using the format [ix,iy]=value. All lines may contain comments separated by double slashes. The following example shows a small sample matrix :
SDL_sparse_matrix 12 // number of elements in sparse matrix 2 9 // lowest and highest column 1 10 // lowest and highest row [2,1]=211 [3,2]=3002 [3,5]=305 [3,7]=38777 [3,8]=8 [3,10]=30 [5,7]=4421107 [7,7]=712007 [8,1]=112001 [8,8]=22 [9,1]=21401 [9,7]=933
|