
Public Member Functions | |
| Matrix (uint rows, uint columns) | |
| Initializes a new instance of the Matrix<T> class with the specified dimensions. | |
| Matrix (uint rows, uint columns, T[,] data) | |
| Initializes a new instance of the Matrix<T> class with given values. | |
| Matrix (uint rows, uint columns, T[] data) | |
| Initializes a new instance of the Matrix<T> class with given values. | |
| IEnumerator< T > | GetEnumerator () |
| override int | GetHashCode () |
| Computes a hash code based on all elements in the matrix. | |
| override string | ToString () |
| Returns a string representation of the matrix. | |
Static Public Member Functions | |
| static Matrix< T > | Diagonal (uint size, T value) |
| Creates a diagonal matrix with the given value on the diagonal. | |
| static Matrix< T > | Identity (uint size) |
| Creates an identity matrix of given size. | |
Properties | |
| uint | Rows [get] |
| Number of rows in the matrix. | |
| uint | Columns [get] |
| Number of columns in the matrix. | |
| T | this[uint row, uint col] [get, set] |
| Gets or sets the element at the specified row and column. | |
| static IEqualityComparer< Matrix< T > > | Comparer = new MatrixEqualityComparer() [get] |
| Gets a default equality comparer for comparing Matrix<T> data values. | |
Represents a generic 2D matrix of elements with a specified number of rows and columns.
Provides utilities such as creating diagonal or identity matrices and converting to a flat array.
| T | The type of the elements stored in the matrix. |
|
inline |
Initializes a new instance of the Matrix<T> class with the specified dimensions.
All elements are initialized to the default value of T .
| rows | Number of rows. |
| columns | Number of columns. |
|
inline |
Initializes a new instance of the Matrix<T> class with given values.
| rows | Number of rows. |
| columns | Number of columns. |
| data | 2D Array in row-major order. |
|
inline |
Initializes a new instance of the Matrix<T> class with given values.
| rows | Number of rows. |
| columns | Number of columns. |
| data | Flat array of size rows * columns in row-major order. |
|
inlinestatic |
Creates a diagonal matrix with the given value on the diagonal.
|
inline |
Computes a hash code based on all elements in the matrix.
|
inlinestatic |
Creates an identity matrix of given size.
|
inline |
Returns a string representation of the matrix.
|
get |
Number of columns in the matrix.
|
staticget |
Gets a default equality comparer for comparing Matrix<T> data values.
|
get |
Number of rows in the matrix.
|
getset |
Gets or sets the element at the specified row and column.