Overload List
| # | Signature | Description |
|---|---|---|
| 1 | TVecInt *GetRow(TMtxInt *Mtx, int Row) const; | Copies a row from matrix. |
| 2 | TVecInt *GetRow(TMtxInt *Mtx, int Row, int Col, int Index, int Len) const; | Copy the Row-th column elements [Col]..[Col+Len-1] to calling vector elements [Index]..[Index+Len-1]. |
| 3 | TVecInt *GetRow(TMtxInt *Mtx, int Row, int Col, int Len) const; | Copy the Row-th column elements [Col]..[Col+Len-1] to calling vector. |
Overload 1: TVecInt *GetRow(TMtxInt *Mtx, int Row) const;
Copies a row from matrix.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Mtx | TMtxInt * | |
| 2 | Row | int |
Copies the Row-th row from Mtx matrix to calling vector. The TMtxVecBase::Length and TMtxVecInt::IntPrecision properties of calling vector are adjusted automatically. An exception is raised if condition checking is enabled and Row is greater than Mtx.Rows-1.
#include "MtxVecInt.h"
#include "Units.MtxVecInt.h"
using namespace Dew;
using namespace Dew::Math;
using namespace Dew::Math::Units::MtxVecInt;
void Example()
{
TVecInt* a;
TMtxInt* b;
CreateIt(a);
CreateIt(b);
b->SetIt(2, 2, DewArray<int>{1, 2, 3, 4});
a->GetRow(b, 0); // a now contains [1,2]
FreeIt(a);
FreeIt(b);
}
Overload 2: TVecInt *GetRow(TMtxInt *Mtx, int Row, int Col, int Index, int Len) const;
Copy the Row-th column elements [Col]..[Col+Len-1] to calling vector elements [Index]..[Index+Len-1].
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Mtx | TMtxInt * | |
| 2 | Row | int | |
| 3 | Col | int | |
| 4 | Index | int | |
| 5 | Len | int |
The TMtxVecInt::IntPrecision property of calling vector must be set explicitly. An exception is raised if condition checking is enabled and column array borders are overrun.
#include "MtxExprInt.h"
using namespace Dew;
using namespace Dew::Math;
void Example()
{
VectorInt a;
MatrixInt b;
b = {{1, 2}, {3, 4}};
a.GetRow(b, 0); // a now contains [1,2]
}
Overload 3: TVecInt *GetRow(TMtxInt *Mtx, int Row, int Col, int Len) const;
Copy the Row-th column elements [Col]..[Col+Len-1] to calling vector.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Mtx | TMtxInt * | |
| 2 | Row | int | |
| 3 | Col | int | |
| 4 | Len | int |
The TMtxVecBase::Length and TMtxVecInt::IntPrecision properties of calling vector are adjusted automatically. An exception is raised if condition checking is enabled and column array borders are overrun.