Re: Interest check: Boost.Algorithm.Statsort — O(n log log n) sorting

Rainer Deyke via Boost <[email protected]>
Newsgroups gmane.comp.lib.boost.devel
Message-ID <[email protected]>
On 3/11/26 19:59, Peter Taraba via Boost wrote:
> I've added projection overloads to statsort that address exactly the pattern you
> described:
>       boost::algorithm::statsort(my_vector,
>           [](const my_complex_type& x) { return x.z; });
> The projection must return an arithmetic type, which is then used as the sort
> key. Both the container and iterator interfaces support it:
>       // Container overload
>       boost::algorithm::statsort(my_vector,
>           [](const my_complex_type& x) { return x.z; });
>       // Iterator overload
>       boost::algorithm::statsort(my_vector.begin(), my_vector.end(),
>           [](const my_complex_type& x) { return x.z; });
> The updated code is on GitHub: https://github.com/drpt78/statsort
> Does this cover your use case? Happy to hear if there are other patterns I
> should consider.

Yes, this is exactly what I was looking for.


-- 
Rainer Deyke - [email protected]

_______________________________________________
Boost mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://lists.boost.org/mailman3/lists/boost.lists.boost.org/
Archived at: https://lists.boost.org/archives/list/[email protected]/message/4SDR6QO6NMEXOXYNWYQ64K4T2UVADS5L/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.