Saint Louis University |
Computer Science 146
|
Dept. of Math & Computer Science |
Topic: Matrix Multiplication
Due:
11:59pm Tuesday, 20 September 2011
Please make sure you adhere to the policies on academic integrity.
In class, we gave an initial implementation of the matrix class that supported construction, indexing, and addition, as well as scalar multiplication. Your goal is to implement the function to support matrix multiplications. It has signature
matrix operator*(const matrix& other) constIts responsibility is to return a new matrix that results when multiplying two matrices (e.g., A*B).
We are providing the basic framework for the matrix class, and a very simple driver named test that allows you to enter the name of a file that contains data for two matrices, separated by a blank line, and which reads those matrices and then tries to perform the appropriate additions and multiplications based upon the dimensions of those matrices.
cp -R /Public/goldwasser/146/asgn03 .This will cause a new folder named asgn03 to appear in your working directory including all files that you need for this assignment. Alternatively, these files can be downloaded individual from this website. There are four files in the distribution:
makeit will attempt to compile your matrix code and the test driver. Assuming it compiles cleanly, you can execute the driver by subsequently typing
./test
Your assignment should be submitted electronically (details on the submission process). The only file that I need from you is the source code matrix.h.