| Home | Libraries | People | FAQ | More

## Function template float_sort

boost::sort::spreadsort::float_sort

## Synopsis

    // In header: <boost/sort/spreadsort/float_sort.hpp>

    template<typename RandomAccessIter>
      void float_sort(RandomAccessIter first, RandomAccessIter last);

## Description

\brief @c float_sort with casting to the appropriate size. \param[in] first Iterator pointer to first element. \param[in] last Iterator pointing to one beyond the end of data.

Some performance plots of runtime vs. n and log(range) are provided:
windows_float_sort
osx_float_sort

A simple example of sorting some floating-point is:

    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 ascending values "1.0 1.3 2.3".