procedure SumRows(const Dst: TVecInt);
Calculates the sum of each of the calling matrix Rows.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Dst | TVecInt | source TVecInt |
Result: stored in self (calling object)
Remarks:
Calculates the sum of each of the calling matrix Rows 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,2,
2,4]);
A.SumRows(V); // V = [3,6]
FreeIt(V);
FreeIt(A);
end;