TVec *GroupSum(TMtxVecInt *Bins, TMtxVec *Data, const int BinsMax = - 1);
Sums items from Data with matching corresponding indexes from Bins and places result in self.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Bins | TMtxVecInt * | |
| 2 | Data | TMtxVec * | |
| 3 | BinsMax = - 1 | const int |
Remarks:
The size of self is set to BinsMax+1 provided that sufficient memory is available. BinsMax with default value of -1 indicates that Bins.Max call is to be made internally. The routine does not perform additional range checking, if BinsMax is provided explicitely (memory overwrite is possible).
Declared in Dew::Math::TVec · Dew.Math/MtxVec.h · Cross-compiler