checks whether the data-type provided is an integer, castable float, string,
won't accept types that don't have the appropriate type traits.
Overloading variants are provided that permit use of user-defined right-shift functors and comparison functors.
Each function is optimized for its set of arguments; default functors are not provided to avoid the risk of any reduction of performance.
See overloading section.
function provides a wrapper that calls the fastest sorting algorithm available
for a data-type, enabling faster generic programming.
See example folder for all examples.
See sample.cpp for a simple working example.
For an example of 64-bit integer sorting, see int64.cpp.
This example sets the element type of a vector to 64-bit integer
#define DATA_TYPE boost::int64_t
and calls the sort
For a simple example sorting
vector<float> vec; vec.push_back(1.0); vec.push_back(2.3); vec.push_back(1.3); ... spreadsort(vec.begin(), vec.end()); //The sorted vector contains "1.0 1.3 2.3 ..."
See also floatsample.cpp which checks for abnormal values.