Matrix::SumRows Method

void SumRows(TVec *Dst) const;

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 Matrix::Length and Matrix::Complex properties of the Dst vector are adjusted automatically.

Examples
#include "MtxExpr.h"

using namespace Dew;
using namespace Dew::Math;

void Example()
{
    Matrix A;
    Vector V;

    A.SetIt(2, 2, false, DewArray<double>{1, 2,
        2, 4});

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