Cortex  10.0.0-a4
Public Member Functions | List of all members
IECore::RadixSort Class Reference

#include <RadixSort.h>

Public Member Functions

 BOOST_STATIC_ASSERT (sizeof(int)==4)
 
 BOOST_STATIC_ASSERT (sizeof(unsigned int)==4)
 
 BOOST_STATIC_ASSERT (sizeof(float)==4)
 
const std::vector< unsigned int > & operator() (const std::vector< float > &input)
 
const std::vector< unsigned int > & operator() (const std::vector< unsigned int > &input)
 
const std::vector< unsigned int > & operator() (const std::vector< int > &input)
 

Detailed Description

A RadixSort implementation derived from Pierre Terdiman's OPCODE library, which has as "free for use in any commercial or non-commercial program" licence. The RadixSort class maintains state so that successive calls to it are able to exploit any coherence in the source data. Sorting is done in ascending order.

Member Function Documentation

const std::vector<unsigned int>& IECore::RadixSort::operator() ( const std::vector< float > &  input)

Sort the given vector of floats, returning a vector of indices representing a mapping from the given input to the sorted result. For example, the position of input[3] in the sorted result can be found in indices[3].

const std::vector<unsigned int>& IECore::RadixSort::operator() ( const std::vector< unsigned int > &  input)

Sort the given vector of unsigned ints, returning a vector of indices representing a mapping from the given input to the sorted result. For example, the position of input[3] in the sorted result can be found in indices[3].

const std::vector<unsigned int>& IECore::RadixSort::operator() ( const std::vector< int > &  input)

Sort the given vector of signed ints, returning a vector of indices representing a mapping from the given input to the sorted result. For example, the position of input[3] in the sorted result can be found in indices[3].


The documentation for this class was generated from the following file: