Overload List
| # | Signature | Description |
|---|---|---|
| 1 | TMtxInt Resize(TMtxInt Src, Int32 NewRows, Int32 NewCols) | Sizes the calling matrix to NewRows and NewCols. |
| 2 | TMtxInt Resize(Int32 NewRows, Int32 NewCols) | Resizes the matrix, while preserving the values in already allocated memory. |
Overload 1: TMtxInt Resize(TMtxInt Src, Int32 NewRows, Int32 NewCols)
Sizes the calling matrix to NewRows and NewCols.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Src | TMtxInt | source TMtxInt |
| 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: TMtxInt 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.MatrixInt.Rows property to NewRows, Dew.Math.MatrixInt.Cols property to NewCols, while preserving the values in already allocated memory.
Examples
TMtxInt A;
TMtxInt B;
MtxVec.CreateIt(out A, out B);
try
{
A.SetIt(2,2,[1,3,
2,4]);
B.Resize(A,3,2);
// B becomes:
// [1,2,0,
// 3,4,0]);
}
finally
{
MtxVec.FreeIt(ref A, ref B);
}
See Also: MatrixInt.Size