TMtxSmallInt.SumCols Method

procedure SumCols(const Dst: TVecInt);

Calculates the sum of each of the calling matrix columns.

#NameTypeDescription
1DstTVecIntsource TVecInt

Result: stored in self (calling object)

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
var  A: TMtxInt;
    V: TVecInt;
begin
    CreateIt(A);
    CreateIt(V);
    A.Size(2,2,[1,5,
        2,3]);

    A.SumCols(V); // V = [3,8]
    FreeIt(V);
    FreeIt(A);
end;