The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | May 2017 |
| Last Sign in: | 407 Weeks Ago, 6 Days Ago |
| Questions Answered: | 66690 |
| Tutorials Posted: | 66688 |
MCS,PHD
Argosy University/ Phoniex University/
Nov-2005 - Oct-2011
Professor
Phoniex University
Oct-2001 - Nov-2016
Our second project is intended to provide our own linear algebra classes (n-dim vector and nxm dim matrix) [based on our in-class V excersices]. Your classes should be implemented (each class a header and a source file) and your test program should use your classes via a shared library (Tip: test and debug your classes + test program via our modular approach, see Lec 5).
- Your vector class should use a dynamically allocated array
- Your Matrix class should use the STL vector class to implement a "2d array" (see in-class 5)
Functionalities of the vector class:
All standard operators (and also length, ...) should be defined, in addition for dimensions 2 and 3 define also the vector product.
Functionalities of the matrix class:
All standard operators for matrix and matrix/vector operations should be defined. Implement checks based on the operations if they are allowed given the dimension of the matrix/vector. Allow the matrix class to be a nxm dimensional matrix.
Also implement:
- the transposed matrix.
- the determinant of a matrix: The simplest implementation (the one you should use) utilizes a recursion algorithm (have a look at the example program section for a simple recursion program).
In addition (as a very good excercise but not necessary) try to implement for the simplest cases a matrix inversion.
Use as a test matrix:
1 3 3
1 4 3
1 3 4
Hel-----------lo -----------Sir-----------/Ma-----------dam-----------Tha-----------nk -----------You----------- fo-----------r u-----------sin-----------g o-----------ur -----------web-----------sit-----------e a-----------nd -----------and----------- ac-----------qui-----------sit-----------ion----------- of----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n.P-----------lea-----------se -----------pin-----------g m-----------e o-----------n c-----------hat----------- I -----------am -----------onl-----------ine----------- or----------- in-----------box----------- me----------- a -----------mes-----------sag-----------e I----------- wi-----------ll