Ranges/algorithms for aggregation

"Luís "Luís
Fri Mar 21 09:09:45 PDT 2014


On Friday, 21 March 2014 at 16:04:45 UTC, bearophile wrote:
> I think this problem needs a sorting or a hash. One possible 
> solution, if you don't need an associative array as output, is 
> to use a multiSort followed by a building of groups using 
> slicing. It could be efficient enough. Later you search the 
> keys with a some kind of binary search.

The number of keys is large and unbounded (not just three as in 
my example), so I guess this multiSort approach would not be 
practical, right? I think we really need the hashGroupBy.


More information about the Digitalmars-d-learn mailing list