Overload List
| # | Signature | Description |
|---|---|---|
| 1 | TMtx *Resize(int NewRows, int NewCols); | Resizes the matrix, while preserving the values in already allocated memory. |
| 2 | TMtx *Resize(TMtx *Src, int NewRows, int NewCols); | Performs resize of the calling matrix to NewRows and NewCols. |
Overload 1: TMtx *Resize(int NewRows, int NewCols);
Resizes the matrix, while preserving the values in already allocated memory.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | NewRows | int | |
| 2 | NewCols | int |
Remarks:
Sets the TMtx::Rows property to NewRows, TMtx::Cols property to NewCols, while preserving the values in already allocated memory.
Examples
#include "MtxVec.h"
#include "Units.MtxVec.h"
using namespace Dew;
using namespace Dew::Math;
using namespace Dew::Math::Units::MtxVec;
void Example()
{
TMtx *A, *B;
CreateIt(A, B);
A->SetIt(2, 2, false, DewArray<double>{1, 3,
2, 4});
B->Resize(A, 3, 2);
// B becomes:
// [1,3,
// 2,4,
// undef,undef]
FreeIt(A, B);
}
See Also: TMtx::Size
Declared in Dew::Math::TMtx · Dew.Math/MtxVec.h · Cross-compiler
Overload 2: TMtx *Resize(TMtx *Src, int NewRows, int NewCols);
Performs resize of the calling matrix to NewRows and NewCols.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Src | TMtx * | |
| 2 | NewRows | int | |
| 3 | NewCols | int |
Remarks:
Copies the Src matrix values to the calling matrix. The elements outside the newly created matrix size are not referenced.
Declared in Dew::Math::TMtx · Dew.Math/MtxVec.h · Cross-compiler