5903 Intro Scientific Prog:
MatrixB: Specification
- Basic Matrix Algebra for Sparse and Full matrices. Procedures need to be provided to
- Read sparse matrices in the ".5903SparseMatrix" format from a file. The format is described at the bottom of this page.
- Read full matrices using the spec from the earlier assignment.
- Write matrices in both sparse and full formats. Two seperate procedures is good.
- Check that the sparse matrix file is ordered.
- Order a file for writing to the sparse matrix format.
- Convert from Sparse representation to Full representation.
- Compute matrix matrix (with vector as a special case) products in all combinations
- Full.Full
- Full.Sparse
- Sparse.Full
- Sparse.Sparse
- Test your code on small samples. I will provide them on request but it should be simple enough to make your own.
- 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
...