Course Home | Assignments | Computing Resources | Lab Hours/Tutoring | Schedule

Saint Louis University

Computer Science 146
Object-Oriented Practicum

Michael Goldwasser

Fall 2010

Dept. of Math & Computer Science

Assignment 04

Matrix Transposition

Overview

Topic: Matrix Transposition
Due: 11:59pm Tuesday, 28 September 2010

Please make sure you adhere to the policies on academic integrity.


Introduction

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.

Your task

Starting with the files from the preceding assignment, you are to add support for matrix transpositions in the following way: You should be able to rebuild your project with the existing makefile.

Submitting your project

Attach updated versions of matrix.h and test.cpp to an email.


Michael Goldwasser
CSCI 146, Fall 2010
Last modified: Wednesday, 29 September 2010
Course Home | Assignments | Computing Resources | Lab Hours/Tutoring | Schedule