Advertisement
kaburen

Untitled

Dec 5th, 2019
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.09 KB | None | 0 0
  1. #ifndef MATRIX_H
  2. #define MATRIX_H
  3. #include <iostream>
  4. #include <cstdlib>
  5. #include <ctime>
  6. #include <random>
  7.  
  8. using namespace std;
  9.  
  10. const double EPS=0.0000001;
  11.  
  12. class Matrix
  13. {
  14. public:
  15. Matrix();
  16. Matrix(int x, int y);
  17. Matrix(double **tab, int x, int y);
  18. Matrix(const Matrix& mtx);
  19. ~Matrix();
  20. void print();
  21. void generate();
  22. int size();
  23. void resize(int x, int y);
  24. int getM();
  25. int getN();
  26. Matrix& operator=(Matrix const& mtx);
  27. Matrix operator +();
  28. Matrix operator -();
  29. Matrix operator +(Matrix const& mtx);
  30. Matrix operator -(Matrix const& mtx);
  31. Matrix operator *(double const& t);
  32. Matrix operator *(Matrix const& mtx);
  33. Matrix& operator +=(Matrix const& mtx);
  34. Matrix& operator -=(Matrix const& mtx);
  35. Matrix& operator *=(double const& t);
  36. Matrix& operator *=(Matrix const& mtx);
  37. bool operator ==(Matrix const& mtx);
  38. bool operator !=(Matrix const& mtx);
  39. friend ostream& operator <<(ostream &, Matrix const& mtx);
  40. friend istream& operator >>(istream &, Matrix const& mtx);
  41. double& operator [](int t);
  42. double& operator ()(int t, int k);
  43. private:
  44. int m,n;
  45. double **matrix;
  46.  
  47.  
  48. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement