Boost logo

Boost :

From: Herve Bronnimann (hbr_at_[hidden])
Date: 2002-06-02 15:55:54


Dear all: here is a linear sort library (counting sort, radix sort, and
hopefully one day block sort), that has the same interface as std::sort.
Examples:

  vector< boost::array<int,3> > v;
  boost::radix_sort(v.begin(), v.end());

  nth_element_property_map<boost::array<char,3>, char> project;
  boost::counting_sort(v.begin(), v.end(), project);

The value type is the same as that of the iterator. You can pass a
property_map, then the value type is that of the property map instead.
The counting sort is limited to a few value types (mainly chars and shorts).
The radix sort works with all builtin types (integral and floating point
types), as well as builtin arrays and boost::arrays. I hope to extend to
tuples someday.

For further details, including future plans, see the boost-sandbox cvs
repository:

http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/boost-sandbox/boost-sandbox/libs/linear_sort/doc/linear_sort.htm

I welcome any comments or improvements, or even bug reports. I've
compiled it with g++ (v3) and it does not generate warnings, but I'd
appreciate to receive compilation results with other platforms.

Best,

-- 
Hervé

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk