Just to be clear, Steven's code is not actually radix sort, it's bucket
sort, right? Which is great, but let's not get confused about what's what.
Steven, I gave it a quick test but it failed when trying to include
. Looks like Robert Ramey changed the names of
things around 1.37.0. (I tested with 1.53.0.) Changing it
to fixed it up.
Looks like <vector>, <cstring> and <limits> are unnecessary includes in
some of the files?
Otherwise, it worked, and was much faster than std::sort(), so well done.
:)
I'm not real sure about the interface, though: do they have to be different
named functions (integer_, float_, string_)? Can't it be called
bucket_sort() and specialized for different types? And reverse sorting,
isn't that done by passing reverse iterators?
Out of curiosity, I decided to tackle the problem and wrote an
implementation of counting sort, which as you may know, is one way of
implementing radix sort. The code is not ready for a formal review but I
would really appreciate feedback on it, as it is written with a view to
inclusion in Boost.
https://github.com/jeremy-murphy/integer-sort
I'm particularly still uncertain about the interface (asking for forward
AND reverse iterators seems annoying, however legitimate). Thanks, cheers.
Jeremy
On 14 July 2013 01:57, Sourav wrote:
From: Boost [mailto:boost-bounces@lists.boost.org] On Behalf Of
Steven Ross
Sent: Thursday, July 11, 2013 11:52 AM
To: boost@lists.boost.org
Subject: Re: [boost] radix sort
Here's the boost library ready for review:
https://github.com/boost-vault/Miscellaneous/blob/master/algorithm_sorting.z...
And here's the sourceforge project (same code, but setup for running
outside of boost): http://sourceforge.net/projects/spreadsort/
Steven,
Thanks for the response. I am just trying to pick up a project
from the algorithms/data structure
sections listed in the SoC page. I do not know whether there is a demand
for the regular radix sort.
Regards,
-Sourav
_______________________________________________
Unsubscribe & other changes:
http://lists.boost.org/mailman/listinfo.cgi/boost