-
Notifications
You must be signed in to change notification settings - Fork 0
Matrix
Tav edited this page Jul 1, 2016
·
5 revisions
###Namespace: RedMath.LinearAlgebra
The Matrix class represent a matrix. It allows for operations between matrices.
For more info about matrices: https://en.wikipedia.org/wiki/Matrix_(mathematics)
Creates a 1-by-1 identity matrix
Matrix m = new Matrix()
The resulting matrix is:
| 1 |
Creates a matrix with rows rows and cols columns
Matrix m = new Matrix(1, 2)
The resulting matrix is:
| 0 | 0 |
Creates a matrix from the specified 2-dimensional array
Matrix m = new Matrix(new double[,] { { 1, 2 } { 3, 4 } })
The resulting matrix is:
| 1 | 2 |
| 3 | 4 |
It is recommended that you will call this constructor using the following syntax:
Matrix m = new Matrix
(
new double[,]
{
{ 1, 2 },
{ 3, 4 },
}
);