23 July 2014 07:57:56 AM ST_IO_PRB: C++ version Test the ST_IO library. TEST01 ST_WRITE writes an ST file. ST header information: Minimum row index I_MIN = 0 Maximum row index I_MAX = 4 Minimum col index J_MIN = 0 Maximum col index J_MAX = 4 Number of rows M = 5 Number of columns N = 5 Number of nonzeros NST = 11 Sparse Triple (ST) data: # I J A ---- ---- ---- -------------- 0 4 0 51 1 0 1 12 2 0 0 11 3 2 2 33 4 0 4 15 5 4 2 53 6 4 4 55 7 1 1 22 8 2 4 35 9 3 3 44 10 1 0 21 Wrote the matrix data to 'a5by5.st' TEST02 ST_HEADER_READ reads the header from an ST file. ST_DATA_READ reads the data from an ST file. Read the data from 'kershaw.st' ST header information: Minimum row index I_MIN = 0 Maximum row index I_MAX = 3 Minimum col index J_MIN = 0 Maximum col index J_MAX = 3 Number of rows M = 4 Number of columns N = 4 Number of nonzeros NST = 12 Sparse Triplet (ST) data read from file: # I J A ---- ---- ---- -------------- 0 0 0 3 1 1 0 -2 2 3 0 2 3 0 1 -2 4 1 1 3 5 2 1 -2 6 1 2 -2 7 2 2 3 8 3 2 -2 9 0 3 2 10 2 3 -2 11 3 3 3 TEST03 ST_SORT_A sorts an ST matrix by columns. ST header information: Minimum row index I_MIN = 1 Maximum row index I_MAX = 5 Minimum col index J_MIN = 1 Maximum col index J_MAX = 5 Number of rows M = 5 Number of columns N = 5 Number of nonzeros NST = 11 Matrix data before sorting: # I J A ---- ---- ---- -------------- 0 5 1 51 1 1 2 12 2 1 1 11 3 3 3 33 4 1 5 15 5 5 3 53 6 5 5 55 7 2 2 22 8 3 5 35 9 4 4 44 10 2 1 21 Matrix data sorted by column: # I J A ---- ---- ---- -------------- 0 1 1 11 1 2 1 21 2 5 1 51 3 1 2 12 4 2 2 22 5 3 3 33 6 5 3 53 7 4 4 44 8 1 5 15 9 3 5 35 10 5 5 55 ST_IO_PRB: Normal end of execution. 23 July 2014 07:57:56 AM