Advertisement
Voldemord

zad5/6New Matrix.h

Jan 10th, 2020
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.06 KB | None | 0 0
  1. // MATRIX.h
  2. #ifndef MATRIX_H
  3. #define MATRIX_H
  4.  
  5. #include <iostream>
  6.  
  7. class Matrix{
  8. private:
  9.     int m;
  10.     int n;
  11.  
  12.     double randDouble();
  13.     void allocate(int, int);
  14.     void allocate(double** paths, int m, int n);
  15. public:
  16.     double** matrix;
  17.     void randomDoubleMatrix();
  18.     void reallocate(double**, int, int);
  19.     void printMatrix();
  20.     void setM(int);
  21.     void setN(int);
  22.     int getM();
  23.     int getN();
  24.     Matrix();
  25.     Matrix(double** array, int m, int n);
  26.     Matrix(int, int);
  27.     Matrix(Matrix &);
  28.     ~Matrix();
  29.  
  30.     // przeci¹¿anie
  31.     void operator =(Matrix& b);
  32.     void operator-();
  33.     void operator+();
  34.     void operator*(float f);
  35.     void operator*(Matrix&);
  36.  
  37.     Matrix& operator+(Matrix&);
  38.     Matrix& operator-(Matrix&);
  39.     Matrix& operator+=(Matrix&);
  40.     Matrix& operator-=(Matrix&);
  41.     Matrix& operator*=(float f);
  42.     Matrix& operator*=(Matrix&);
  43.  
  44.     bool operator==(Matrix&);
  45.     bool operator!=(Matrix&);
  46.  
  47.     double operator()(int y, int x);
  48.     double& operator[](int k);
  49.  
  50. };
  51.  
  52. #endif // MATRIX_H
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement