void SumRows(TVecInt *Dst);
Calculates the sum of each of the calling matrix Rows.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Dst | TVecInt * |
Remarks:
Calculates the sum of each of the calling matrix Rows and stores the results in Dst vector. The TMtxSmallInt::Length and TMtxSmallInt::IntPrecision properties of the Dst vector are adjusted automatically.
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;
TVecInt* V;
CreateIt(A);
CreateIt(V);
A->SetIt(2, 2, DewArray<int>{1, 2,
2, 4});
A->SumRows(V); // V = [3,6]
FreeIt(V);
FreeIt(A);
}
See Also: TMtxSmallInt::SumCols
Declared in Dew::Math::TMtxInt · Dew.Math/MtxVecInt.h · Cross-compiler