Matrix::SumCols Method

void SumCols(TVec *Dst) const;

The sum of each of the calling matrix columns.

#NameTypeDescription
1DstTVec *
Remarks:

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

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