Advertisement
Infernale

NCTU LAB 24/10 NUM 3 [Matrix.h]

Oct 24th, 2019
515
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.77 KB | None | 0 0
  1. #ifndef MATRIX_H
  2. #define MATRIX_H
  3.  
  4. #include <vector>
  5. #include <iomanip>
  6. #include <algorithm>
  7. #include <iostream>
  8. using namespace std;
  9.  
  10. class Matrix{
  11.   private:
  12.     int row, column;
  13.     vector <double> coefficient;
  14.   public:
  15.     Matrix();
  16.     Matrix(int row, int column, vector<double>);
  17.  
  18.     void setMatrix(int row, int column, vector<double> coefficient);
  19.     vector<double> getCoefficient() const;
  20.     int getRow() const;
  21.     int getColumn() const;
  22.  
  23.     void operator()();
  24.  
  25.     bool isAddable(const Matrix& matrix);
  26.     bool isSubstractable(const Matrix& matrix);
  27.     bool isMultipliable(const Matrix& matrix);
  28.  
  29.     Matrix operator+(const Matrix& matrix);
  30.     Matrix operator-(const Matrix& matrix);
  31.     Matrix operator*(const Matrix& matrix);
  32. };
  33.  
  34. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement