void SumCols(TVec *Dst);
Calculates the sum of each of the calling matrix columns.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Dst | TVec * |
Remarks:
Calculates the sum of each of the calling matrix columns and stores the results in Dst vector. The TMtx::Length and TMtx::Complex properties of the Dst vector are adjusted automatically.
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;
TVec* V;
CreateIt(A);
CreateIt(V);
A->SetIt(2, 2, false, DewArray<double>{1, 5,
2, 3});
A->SumCols(V); // V = [3,8]
FreeIt(V);
FreeIt(A);
}
See Also: TMtx::SumRows
Declared in Dew::Math::TMtx · Dew.Math/MtxVec.h · Cross-compiler