1 #ifndef edu_jmu_cs_Matrix_h 2 #define edu_jmu_cs_Matrix_h 4 #define TOLERANCE 0.0001 7 #include <initializer_list> 20 double cof(
const Matrix& A,
int i,
int j);
65 void allocateMemory(
int rows,
int columns);
70 void deallocateMemory();
77 void setValues(
double value);
85 void setValues(
const Matrix& other);
93 void setValues(
const double* values);
101 void setValues(
double** values);
115 Matrix(
int rows,
int columns);
145 friend double cof(
const Matrix& A,
int i,
int j);
153 friend double det(
double a);
165 friend double det(
const Matrix& A);
196 double get(
int r,
int c)
const;
207 double get(
int i)
const;
221 Matrix getColumn(
int c)
const;
228 int getColumns()
const;
246 friend Matrix identity(
int size);
259 friend double mminor(
const Matrix& A,
int i,
int j);
281 double& operator()(
int r,
int c);
292 double& operator()(
int i);
313 Matrix& operator=(std::initializer_list<double> values);
413 friend bool operator==(
const Matrix& A,
const Matrix& B);
423 friend bool operator!=(
const Matrix& A,
const Matrix& B);
int rows
Definition: Matrix.h:57
friend double mminor(const Matrix &A, int i, int j)
Definition: Matrix.cpp:156
friend double cof(const Matrix &A, int i, int j)
Definition: Matrix.cpp:37
friend Matrix operator|(const Matrix &A, const Matrix &B)
Definition: Matrix.cpp:207
friend Matrix submatrix(const Matrix &A, int i, int j)
Definition: Matrix.cpp:348
friend Matrix identity(int size)
Definition: Matrix.cpp:148
friend Matrix operator+(const Matrix &A, const Matrix &B)
Definition: Matrix.cpp:231
friend Matrix operator*(const Matrix &A, const Matrix &B)
Definition: Matrix.cpp:263
friend double dot(const Matrix &A, const Matrix &B)
Definition: Matrix.cpp:90
double ** values
Definition: Matrix.h:47
friend bool operator!=(const Matrix &A, const Matrix &B)
Definition: Matrix.cpp:311
int columns
Definition: Matrix.h:52
friend bool operator==(const Matrix &A, const Matrix &B)
Definition: Matrix.cpp:298
friend Matrix trans(const Matrix &A)
Definition: Matrix.cpp:372
friend double det(double a)
Definition: Matrix.cpp:60
friend Matrix operator-(const Matrix &A, const Matrix &B)
Definition: Matrix.cpp:247