-
Notifications
You must be signed in to change notification settings - Fork 0
/
matris.h
50 lines (37 loc) · 1.19 KB
/
matris.h
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
41
42
43
44
45
46
47
48
49
50
#include <iostream>
class Matrix
{
private:
unsigned short row;
unsigned short column;
double **content;
public:
Matrix(unsigned short col, unsigned short r);
Matrix(){};
virtual ~Matrix();
void setValue(unsigned short col, unsigned short r, double value);
double getValue(unsigned short col, unsigned short r) const;
void display() const;
Matrix transpose() const;
Matrix multiply(double by) const;
friend Matrix matrixAddition(const Matrix &a, const Matrix &b);
friend Matrix matrixMultiplication(const Matrix &a, const Matrix &b);
};
class Quadratic : public Matrix
{
private:
unsigned short row;
public:
Quadratic(unsigned short r);
Quadratic(){};
~Quadratic();
double minor(unsigned short r, unsigned short col) const;
double cofactor(unsigned short r, unsigned short col) const;
double determinant() const;
Quadratic transpose() const;
Quadratic multiply(double by) const;
Quadratic adjointMatrix() const;
Quadratic inverseMatrix() const;
friend Quadratic matrixAddition(const Quadratic &a, const Quadratic &b);
friend Quadratic matrixMultiplication(const Quadratic &a, const Quadratic &b);
};