Robot

Dependencies:   mbed QEI

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers Matrix.h Source File

Matrix.h

00001 //
00002 // Created by m007 on 26/06/2020.
00003 //
00004 
00005 #ifndef UNTITLED_MATRIX_H
00006 #define UNTITLED_MATRIX_H
00007 
00008 
00009 #ifndef AA_MATRIX_H
00010 #define AA_MATRIX_H
00011 #include <iostream>
00012 #include "Vector.h"
00013 using namespace std;
00014 
00015 
00016 template<class T>
00017 class Matrix{
00018 protected:
00019     int rows;
00020     int columns;
00021     static int objectCount;
00022     T **n;
00023 
00024 public:
00025     Matrix();
00026     Matrix(int rows,int columns);
00027     ~Matrix();
00028 
00029     void PrintResult();
00030     void Reconfigurate(int rows,int columns);
00031     T Determinant();
00032     Matrix<T> Cofactor();
00033     Matrix<T> Inverse();
00034     Matrix<T> PseudoInverse();
00035     Matrix<T> Transpose();
00036 
00037     Matrix& operator=(const Matrix &other );
00038     Matrix& operator=(const T param[][2]);
00039     Matrix& operator=(const T param[][3]);
00040     Matrix& operator=(const T param[][4]);
00041     Matrix operator+(const Matrix &other);
00042     Matrix operator*(const Matrix& other);
00043     Vector<T> operator*(Vector<T>& other);
00044     T& operator()(int row, int col);
00045 
00046 
00047 };
00048 
00049 #endif //AA_MATRIX_H
00050 
00051 #endif //UNTITLED_MATRIX_H