Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef MATRIX_H
- #define MATRIX_H
- #include <iostream>
- #include <cstdlib>
- #include <ctime>
- #include <random>
- using namespace std;
- const double EPS=0.0000001;
- class Matrix
- {
- public:
- Matrix();
- Matrix(int x, int y);
- Matrix(double **tab, int x, int y);
- Matrix(const Matrix& mtx);
- ~Matrix();
- void print();
- void generate();
- int size();
- void resize(int x, int y);
- int getM();
- int getN();
- Matrix& operator=(Matrix const& mtx);
- Matrix operator +();
- Matrix operator -();
- Matrix operator +(Matrix const& mtx);
- Matrix operator -(Matrix const& mtx);
- Matrix operator *(double const& t);
- Matrix operator *(Matrix const& mtx);
- Matrix& operator +=(Matrix const& mtx);
- Matrix& operator -=(Matrix const& mtx);
- Matrix& operator *=(double const& t);
- Matrix& operator *=(Matrix const& mtx);
- bool operator ==(Matrix const& mtx);
- bool operator !=(Matrix const& mtx);
- friend ostream& operator <<(ostream &, Matrix const& mtx);
- friend istream& operator >>(istream &, Matrix const& mtx);
- double& operator [](int t);
- double& operator ()(int t, int k);
- private:
- int m,n;
- double **matrix;
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement