-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmatrix.h
More file actions
40 lines (30 loc) · 861 Bytes
/
Copy pathmatrix.h
File metadata and controls
40 lines (30 loc) · 861 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
//matrix.h
#ifndef __MATRIX_H_INCLUDED__
#define __MATRIX_H_INCLUDED__
#include <vector>
using namespace std;
class Matrix {
private:
vector< vector<double> > mat;
public:
int rows;
int cols;
//constructor
Matrix(int, int);
void insert(int, int, double);
//double get(int, int);
void display(void);
Matrix operator + (Matrix);
void operator += (Matrix);
Matrix operator - (Matrix);
void operator -= (Matrix);
Matrix operator * (Matrix);
Matrix operator * (double);
void operator *= (Matrix);
void operator *= (double);
void operator = (Matrix);
bool operator == (Matrix);
bool operator != (Matrix);
vector<double> operator [] (int);
};
#endif