Dura2D
v0.1.0
An educational 2D game physics library
|
Represents an MxN matrix. More...
#include <d2Math.h>
Public Member Functions | |
d2MatMN () | |
d2MatMN (int M, int N) | |
Constructor that initializes the matrix with given number of rows and columns. | |
d2MatMN (const d2MatMN &m) | |
~d2MatMN () | |
void | Zero () |
Sets all components of the matrix to zero. | |
d2MatMN | Transpose () const |
Transposes the matrix. | |
const d2MatMN & | operator= (const d2MatMN &m) |
d2VecN | operator* (const d2VecN &v) const |
d2MatMN | operator* (const d2MatMN &m) const |
Static Public Member Functions | |
static d2VecN | SolveGaussSeidel (const d2MatMN &A, const d2VecN &b) |
Solves a system of linear equations using the Gauss-Seidel method. | |
Public Attributes | |
int | M |
The number of rows in the matrix. | |
int | N |
The number of columns in the matrix. | |
d2VecN * | rows |
The rows of the matrix. | |
Represents an MxN matrix.
d2MatMN::d2MatMN | ( | ) |
d2MatMN::d2MatMN | ( | int | M, |
int | N ) |
Constructor that initializes the matrix with given number of rows and columns.
M | The number of rows in the matrix. |
N | The number of columns in the matrix. |
d2MatMN::d2MatMN | ( | const d2MatMN & | m | ) |
d2MatMN::~d2MatMN | ( | ) |
Solves a system of linear equations using the Gauss-Seidel method.
A | The matrix of coefficients. |
b | The vector of constants. |
d2MatMN d2MatMN::Transpose | ( | ) | const |
Transposes the matrix.
void d2MatMN::Zero | ( | ) |
Sets all components of the matrix to zero.
int d2MatMN::M |
The number of rows in the matrix.
int d2MatMN::N |
The number of columns in the matrix.
d2VecN* d2MatMN::rows |
The rows of the matrix.