Subject: Re: [boost] radix sort
From: Jeremy Murphy (jeremy.william.murphy_at_[hidden])
Date: 2013-07-21 08:29:40
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
<boost/static_warning.hpp>. Looks like Robert Ramey changed the names of
things around 1.37.0. (I tested with 1.53.0.) Changing it
to <boost/serialization/static_warning.hpp> 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.
I'm particularly still uncertain about the interface (asking for forward
AND reverse iterators seems annoying, however legitimate). Thanks, cheers.
On 14 July 2013 01:57, Sourav <souravatboost_at_[hidden]> wrote:
> >> From: Boost [mailto:boost-bounces_at_[hidden]] On Behalf Of
> > >> Steven Ross
> > >> Sent: Thursday, July 11, 2013 11:52 AM
> > >> To: boost_at_[hidden]
> > >> Subject: Re: [boost] radix sort
> > >>
> > >> Here's the boost library ready for review:
> > >>
> > >>
> > >> And here's the sourceforge project (same code, but setup for running
> > >> outside of boost): http://sourceforge.net/projects/spreadsort/
> > >>
> 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.
> Unsubscribe & other changes:
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk