You are here: Symbol Reference > MtxVecInt Namespace > Classes > TVecInt Class > public > TVecInt.GroupCount Method
MtxVec VCL
ContentsIndex
PreviousUpNext
TVecInt.GroupCount Method

Counts groups of equal numbers within Bins.

Pascal
function GroupCount(const SrcBins: TMtxVecInt; const SrcBinsMax: integer = -1): TVecInt; overload;

The maximum integer value within SrcBins parameter defines the Size of the calling vector. Within each IValues[Idx] of the result will be number of Bin items, which have value equal to "Idx". The size of self is set to SrcBins.Max+1. SrcBinsMax with default value of -1 indicates that Bins.Max is computed internally. The routine does not perform additional range checking, if BinsMax is provided explicitely (memory overwrite is possible, if indexes are less than zero or more than calling vector length).

Copyright (c) 1999-2025 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!