TMtxInt *RowExchange(int i, int j);
Exchanges two matrix Rows.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | i | int | |
| 2 | j | int |
Remarks:
Exchange the i-th and j-th Rows of the calling matrix in-place. An exception is raised if matrix bounds are overrun. The indexes i and j are zero based. (the first row has index 0).
Examples
#include "MtxVecInt.h"
#include "Units.MtxVecInt.h"
using namespace Dew;
using namespace Dew::Math;
using namespace Dew::Math::Units::MtxVecInt;
void Example()
{
TMtxInt *A, *B;
CreateIt(A, B);
A->SetIt(2, 2, DewArray<int>{1, 3,
2, 4});
A->RowExchange(0, 1);
// A becomes:
// [2,4,
// 1,3]);
FreeIt(A, B);
}
See Also: TMtxInt::ColExchange
Declared in Dew::Math::TMtxInt · Dew.Math/MtxVecInt.h · Cross-compiler