5903 Intro Scientific Prog:
MatrixB: Specification

  1. Basic Matrix Algebra for Sparse and Full matrices. Procedures need to be provided to
    1. Read sparse matrices in the ".5903SparseMatrix" format from a file.  The format is described at the bottom of this page.
    2. Read full matrices using the spec from the earlier assignment. 
    3. Write matrices in both sparse and full formats.  Two seperate procedures is good.
    4. Check that the sparse matrix file is ordered.
    5. Order a file for writing to the sparse matrix format.
    6. Convert from Sparse representation to Full representation.
    7. Compute matrix matrix (with vector as a special case) products in all combinations
      1. Full.Full
      2. Full.Sparse
      3. Sparse.Full
      4. Sparse.Sparse
  2. Test your code on small samples.  I will provide them on request but it should be simple enough to make your own. 
  3. You should organize your code into seperate files and make the "makefile" reasonably compact.  
5903SparseMatrix file format: The format (with m and n integers) is where is and js give the position of the float values f.  The rows must be ordered from low numbers to high. 
            5903SparseMatrix \n
            m \t n \t float \n
            i1 \t j1 \t f1 \n
            i2 \t j2 \t f2 \n
            i3 \t j3 \t f3 \n
            i4 \t j4 \t f4 \n
            ...