TMtx::SumRows Method

void SumRows(TVec *Dst);

Calculates the sum of each of the calling matrix rows.

#NameTypeDescription
1DstTVec *
Remarks:

Calculates the sum of each of the calling matrix rows 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, 2,
        2, 4});

    A->SumRows(V); // V = [3,6]
    FreeIt(V);
    FreeIt(A);
}
See Also: TMtx::SumCols
Declared in Dew::Math::TMtx · Dew.Math/MtxVec.h · Cross-compiler