PROJECT OUTLINE


 My project is a C++ matrix library. This is going to be done in a class template format so that the user is not restricted to one data type for their matrices. The idea is to allow the user to add, subtract, multiply, and divide matrices in the same way as they do with any other variables. You will be able to solve linear systems of equations by dividing a vector by a matrix. In addition, the routine will be able to compute the eigenvalues and the eigenvectors of a square matrix. The files and the classes that they will contain are listed below.

  1.   Matrix.h : This is the main home for the matrix class. It has five classes currently (there may be one more added to it.
  2.  

    1.  Arraymd: This is an abstract class that defines some basic functions for an array of arbitrary dimension. This will allow the user to easily integrate an array of 3 or more dimensions into the existing class structure.
    2.  

    3.  Matrix: This is the main class for this project and it is a daughter class of Arraymd. It starts with a basis of the functions that were implement in our 2D array template. Then, all operators will be overloaded. So you can add, subtract, multiply matrices. Also you can add matrices to numbers (or vices versa). (Note that you can also subtract , multiply and divide with numbers.) You can also find the determinant and the transpose of a matrix using this class.
    4.  

    5. Vector: This is also a daughter class of Arraymd. This will also overload the operators as in the Matrix class. In addition, you can now multiply a vector with a matrix and get a solution vector. This will allow the user to easily solve a system of linear equations.
    6.  

       

      1.  RowVector: This class is a daughter of the Vector class. This will have a transpose function that will return a column vector. Also you can add and subtract this type of vector from the rows of a matrix as defined in the matrix class.
      2.  

      3.  ColVector: This class is a daughter class of the vector class. It is similar to the row vector class, but with the addition that a ColVector * RowVector will yield a matrix. This is a technique that is often used in linear system theory in subject like digital control systems.

     

  3.  Eigen.h: This file will contain the class Eigen which will implement a numerical recipes routine (most likely Jacobi) to find the eigenvalues of a matrix which was created using the above matrix class.
  4.  

  5. Error.h: This file contains classes for error handling. The base class is the same as the Exception class that we covered in lecture. Then there are 2 derived class which handle being outside of the defined range and for mismatching of sizes.

 

 

There will be various test files with results as well. If you would like to get a better idea about this project, you can see it in the early stages at:

http://www.physics.uci.edu/~crutan/P231.html