MatrixInt::SumCols Method

void SumCols(TVecInt *Dst) const;

Calculates the sum of each of the calling matrix columns.

#NameTypeDescription
1DstTVecInt *
Remarks:

Calculates the sum of each of the calling matrix columns and stores the results in Dst vector. The TMtxVecBase::Length and TMtxVecInt::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, 5,
        2, 3});

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