Saint Louis University |
Computer Science 146
|
Dept. of Math & Computer Science |
Topic: Matrix Transposition
Due:
11:59pm Tuesday, 28 September 2010
Please make sure you adhere to the policies on academic integrity.
Continuing with the project from the preceding assignment, our goal this week it to add functionality for computing the transpose of a matrix. In MATLAB, this can be done using a special syntax
M = A';
We cannot replicate such a syntax in C++, so we will choose to introduce a member function named transpose into our matrix class definition, to allow such a behavior to be invoked as
M = A.transpose();This should have semantics similar to MATLAB, in that it produces and returns a new matrix that represents the transpose, while leaving the original matrix unchanged.
Update the driver test.cpp to demonstrate use of the
new functionality in the following ways. After performing the
existing set of tests, do additional tests to output
A,