SmartEngine
1.6.0
|
Wrapper around either a const or a mutable matrix. More...
Public Member Functions | |
Matrix (long rows, long cols) | |
Creates a new Matrix instance with the specified rows and cols More... | |
float | GetValue (long row, long col) |
Returns the value at location [row, col] More... | |
unsafe void | GetRow (long row, ref float[] buffer) |
Fills the buffer with a single row from the matrix. The buffer should have space for at least RowCount() elements. More... | |
unsafe void | GetBuffer (ref float[] buffer) |
Fills the buffer with all elements from this matrix. The elements in the buffer will be laid out in row major order ( R0C0, R0C1, R1C0, R1C1, etc). The buffer should have space for at least RowCount() * ColCount() elements. More... | |
void | SetValue (long row, long col, float value) |
Sets a value in the matrix. This will error if the matrix is read only. More... | |
void | Resize (long rows, long cols) |
Resizes the matrix to the specified number of rows and columns. This will error if the matrix is read only. More... | |
void | Zero () |
Assigns 0 to all values in the matrix. More... | |
bool | HasNaN () |
Returns true if any value is NaN, false otherwise. More... | |
Public Member Functions inherited from SmartEngine.Object | |
void | AddRef () |
Increments the internal reference count on this object. It is not common to use this method directly. More... | |
void | Release () |
Decrements the internal reference count on this object. It is not common to use this method directly. More... | |
Public Member Functions inherited from SmartEngine.Disposable | |
void | Dispose () |
Cleans up any internal state. It is not safe to use an object after it has been disposed. More... | |
Properties | |
bool | IsReadOnly [get] |
Returns true if this matrix is read only. More... | |
long | RowCount [get] |
Returns the number of rows in the matrix More... | |
long | ColCount [get] |
Returns the number of columns in the matrix More... | |
Wrapper around either a const or a mutable matrix.
SmartEngine.Matrix.Matrix | ( | long | rows, |
long | cols | ||
) |
Creates a new Matrix instance with the specified rows and cols
rows | |
cols |
unsafe void SmartEngine.Matrix.GetBuffer | ( | ref float[] | buffer | ) |
Fills the buffer with all elements from this matrix. The elements in the buffer will be laid out in row major order ( R0C0, R0C1, R1C0, R1C1, etc). The buffer should have space for at least RowCount() * ColCount() elements.
The passed in buffer will be created or resized if necessary.
unsafe void SmartEngine.Matrix.GetRow | ( | long | row, |
ref float[] | buffer | ||
) |
Fills the buffer with a single row from the matrix. The buffer should have space for at least RowCount() elements.
The passed in buffer will be created or resized if necessary.
float SmartEngine.Matrix.GetValue | ( | long | row, |
long | col | ||
) |
Returns the value at location [row, col]
bool SmartEngine.Matrix.HasNaN | ( | ) |
Returns true if any value is NaN, false otherwise.
void SmartEngine.Matrix.Resize | ( | long | rows, |
long | cols | ||
) |
Resizes the matrix to the specified number of rows and columns. This will error if the matrix is read only.
void SmartEngine.Matrix.SetValue | ( | long | row, |
long | col, | ||
float | value | ||
) |
Sets a value in the matrix. This will error if the matrix is read only.
void SmartEngine.Matrix.Zero | ( | ) |
Assigns 0 to all values in the matrix.
|
get |
Returns the number of columns in the matrix
|
get |
Returns true if this matrix is read only.
|
get |
Returns the number of rows in the matrix