Overload List
| # | Signature | Description |
|---|---|---|
| 1 | TMtx Resize(TMtx Src, Int32 NewRows, Int32 NewCols) | Performs resize of the calling matrix to NewRows and NewCols. |
| 2 | TMtx Resize(Int32 NewRows, Int32 NewCols) | Resizes the matrix, while preserving the values in already allocated memory. |
Overload 1: TMtx Resize(TMtx Src, Int32 NewRows, Int32 NewCols)
Performs resize of the calling matrix to NewRows and NewCols.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Src | TMtx | source TMtx |
| 2 | NewRows | Int32 | |
| 3 | NewCols | Int32 |
Result: stored in self (calling object), returns self for chaining
Remarks:
Copies the Src matrix values to the calling matrix. The elements outside the newly created matrix size are not referenced.
Overload 2: TMtx Resize(Int32 NewRows, Int32 NewCols)
Resizes the matrix, while preserving the values in already allocated memory.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | NewRows | Int32 | |
| 2 | NewCols | Int32 |
Result: stored in self (calling object), returns self for chaining
Remarks:
Sets the Dew.Math.TMtx.Rows property to NewRows, Dew.Math.TMtx.Cols property to NewCols, while preserving the values in already allocated memory.
Examples
TMtx A;
TMtx B;
MtxVec.CreateIt(out A, out B);
try
{
A.SetIt(2,2,false,[1,3,
2,4]);
B.Resize(A,3,2,true);
// B becomes:
// [1,2,0,
// 3,4,0]);
}
finally
{
MtxVec.FreeIt(ref A, ref B);
}
See Also: TMtx.Size