Vector::GroupSum Method

TVec *GroupSum(TMtxVecInt *Bins, TMtxVec *Src, const int BinsMax = - 1) const;

Sums items from Src with matching corresponding indexes from Bins and places result in self.

#NameTypeDescription
1BinsTMtxVecInt *
2SrcTMtxVec *
3BinsMax = - 1const int
Remarks:

The size of self is set to Bins.Max+1 provided that sufficient memory is available. BinsMax with default value of -1 indicates that Bins.Max call is made internally. The routine does not perform additional range checking, if BinsMax is provided explicitely (memory overwrite is possible).

Declared in Dew::Math::Vector · Dew.Math/MtxExpr.h · Cross-compiler