#include <UT_QuickSort.h>
Public Types | |
| enum | compareType { COMPARE_INT, COMPARE_UINT, COMPARE_FLOAT } |
Public Member Functions | |
| UT_QuickSort () | |
| virtual | ~UT_QuickSort () |
| UT_QuickSort & | sort (void *input, size_t size, unsigned int nb, compareType type) |
| int * | getIndices () |
| int | operator() (int idx) |
| UT_QuickSort & | resetIndices () |
| int64 | getUsedRam () const |
| Return the amount of ram used by this particular object. | |
| UT_QuickSort & | sort (unsigned int *input, unsigned int nb, int useindex=1, bool signedvalues=true) |
| UT_QuickSort & | sort (fpreal32 *input, unsigned int nb, int useindex=1) |
| UT_QuickSort & | sort (fpreal64 *input, unsigned int nb, int useindex=1) |
Static Protected Member Functions | |
| static void | urecurse (unsigned int *input, int *index, int len) |
| static void | srecurse (int *input, int *index, int len) |
| static void | frecurse (fpreal32 *input, int *index, int len) |
| static void | drecurse (fpreal64 *input, int *index, int len) |
| static void | frecurse (fpreal32 *input, int len) |
| static void | drecurse (fpreal64 *input, int len) |
| static void | srecurse (int *input, int len) |
| static void | urecurse (unsigned int *input, int len) |
| static void | drecurse (void *input, size_t size, int len, char *tinput) |
| static void | frecurse (void *input, size_t size, int len, char *tinput) |
| static void | srecurse (void *input, size_t size, int len, char *tinput) |
| static void | urecurse (void *input, size_t size, int len, char *tinput) |
| static void | uisort (unsigned int *input, int *index, int len) |
| static void | sisort (int *input, int *index, int len) |
| static void | fisort (fpreal32 *input, int *index, int len) |
| static void | fisort (fpreal32 *input, int len) |
| static void | disort (fpreal64 *input, int *index, int len) |
| static void | disort (fpreal64 *input, int len) |
| static void | sisort (int *input, int len) |
| static void | uisort (unsigned int *input, int len) |
| static void | disort (void *input, size_t size, int len, char *tinput) |
| static void | fisort (void *input, size_t size, int len, char *tinput) |
| static void | sisort (void *input, size_t size, int len, char *tinput) |
| static void | uisort (void *input, size_t size, int len, char *tinput) |
Protected Attributes | |
| UT_IntArray | myIndices |
Definition at line 41 of file UT_QuickSort.h.
| UT_QuickSort::UT_QuickSort | ( | ) |
| virtual UT_QuickSort::~UT_QuickSort | ( | ) | [virtual] |
| static void UT_QuickSort::disort | ( | void * | input, | |
| size_t | size, | |||
| int | len, | |||
| char * | tinput | |||
| ) | [static, protected] |
These are the unsigned, signed, and float sort routines. The ones without an index variable don't sort an index array along with the main array.
| static void UT_QuickSort::disort | ( | fpreal64 * | input, | |
| int | len | |||
| ) | [static, protected] |
These are the unsigned, signed, and float sort routines. The ones without an index variable don't sort an index array along with the main array.
| static void UT_QuickSort::disort | ( | fpreal64 * | input, | |
| int * | index, | |||
| int | len | |||
| ) | [static, protected] |
These are the unsigned, signed, and float sort routines. The ones without an index variable don't sort an index array along with the main array.
| static void UT_QuickSort::drecurse | ( | void * | input, | |
| size_t | size, | |||
| int | len, | |||
| char * | tinput | |||
| ) | [static, protected] |
| static void UT_QuickSort::drecurse | ( | fpreal64 * | input, | |
| int | len | |||
| ) | [static, protected] |
| static void UT_QuickSort::drecurse | ( | fpreal64 * | input, | |
| int * | index, | |||
| int | len | |||
| ) | [static, protected] |
| static void UT_QuickSort::fisort | ( | void * | input, | |
| size_t | size, | |||
| int | len, | |||
| char * | tinput | |||
| ) | [static, protected] |
These are the unsigned, signed, and float sort routines. The ones without an index variable don't sort an index array along with the main array.
| static void UT_QuickSort::fisort | ( | fpreal32 * | input, | |
| int | len | |||
| ) | [static, protected] |
These are the unsigned, signed, and float sort routines. The ones without an index variable don't sort an index array along with the main array.
| static void UT_QuickSort::fisort | ( | fpreal32 * | input, | |
| int * | index, | |||
| int | len | |||
| ) | [static, protected] |
These are the unsigned, signed, and float sort routines. The ones without an index variable don't sort an index array along with the main array.
| static void UT_QuickSort::frecurse | ( | void * | input, | |
| size_t | size, | |||
| int | len, | |||
| char * | tinput | |||
| ) | [static, protected] |
| static void UT_QuickSort::frecurse | ( | fpreal32 * | input, | |
| int | len | |||
| ) | [static, protected] |
| static void UT_QuickSort::frecurse | ( | fpreal32 * | input, | |
| int * | index, | |||
| int | len | |||
| ) | [static, protected] |
| int* UT_QuickSort::getIndices | ( | ) | [inline] |
Return a pointer to the list of indices in sorted order. This list is internally stored in myIndices.
Definition at line 82 of file UT_QuickSort.h.
| int64 UT_QuickSort::getUsedRam | ( | ) | const [inline] |
Return the amount of ram used by this particular object.
Definition at line 93 of file UT_QuickSort.h.
| int UT_QuickSort::operator() | ( | int | idx | ) | [inline] |
Definition at line 84 of file UT_QuickSort.h.
| UT_QuickSort& UT_QuickSort::resetIndices | ( | ) | [inline] |
Reset the internal indices. Note that the list of indices in sorted order is kept internally and is checked at the beginning of the sort routine to check if the list is already sorted.
Definition at line 90 of file UT_QuickSort.h.
| static void UT_QuickSort::sisort | ( | void * | input, | |
| size_t | size, | |||
| int | len, | |||
| char * | tinput | |||
| ) | [static, protected] |
These are the unsigned, signed, and float sort routines. The ones without an index variable don't sort an index array along with the main array.
| static void UT_QuickSort::sisort | ( | int * | input, | |
| int | len | |||
| ) | [static, protected] |
These are the unsigned, signed, and float sort routines. The ones without an index variable don't sort an index array along with the main array.
| static void UT_QuickSort::sisort | ( | int * | input, | |
| int * | index, | |||
| int | len | |||
| ) | [static, protected] |
These are the unsigned, signed, and float sort routines. The ones without an index variable don't sort an index array along with the main array.
| UT_QuickSort& UT_QuickSort::sort | ( | void * | input, | |
| size_t | size, | |||
| unsigned int | nb, | |||
| compareType | type | |||
| ) |
The following sort method is used to sort arbitrary structures. The first element of the structure must be an int, unsigned, or a float depending on the compareType chosen.
| UT_QuickSort& UT_QuickSort::sort | ( | fpreal64 * | input, | |
| unsigned int | nb, | |||
| int | useindex = 1 | |||
| ) |
Sorting methods After sorting, use the getIndices() method to get the list of indices in sorted order. NB: Unlike the UT_RadixSort, the input array IS sorted with this quick sort.
| UT_QuickSort& UT_QuickSort::sort | ( | fpreal32 * | input, | |
| unsigned int | nb, | |||
| int | useindex = 1 | |||
| ) |
Sorting methods After sorting, use the getIndices() method to get the list of indices in sorted order. NB: Unlike the UT_RadixSort, the input array IS sorted with this quick sort.
| UT_QuickSort& UT_QuickSort::sort | ( | unsigned int * | input, | |
| unsigned int | nb, | |||
| int | useindex = 1, |
|||
| bool | signedvalues = true | |||
| ) |
Sorting methods After sorting, use the getIndices() method to get the list of indices in sorted order. NB: Unlike the UT_RadixSort, the input array IS sorted with this quick sort.
| static void UT_QuickSort::srecurse | ( | void * | input, | |
| size_t | size, | |||
| int | len, | |||
| char * | tinput | |||
| ) | [static, protected] |
| static void UT_QuickSort::srecurse | ( | int * | input, | |
| int | len | |||
| ) | [static, protected] |
| static void UT_QuickSort::srecurse | ( | int * | input, | |
| int * | index, | |||
| int | len | |||
| ) | [static, protected] |
| static void UT_QuickSort::uisort | ( | void * | input, | |
| size_t | size, | |||
| int | len, | |||
| char * | tinput | |||
| ) | [static, protected] |
These are the unsigned, signed, and float sort routines. The ones without an index variable don't sort an index array along with the main array.
| static void UT_QuickSort::uisort | ( | unsigned int * | input, | |
| int | len | |||
| ) | [static, protected] |
These are the unsigned, signed, and float sort routines. The ones without an index variable don't sort an index array along with the main array.
| static void UT_QuickSort::uisort | ( | unsigned int * | input, | |
| int * | index, | |||
| int | len | |||
| ) | [static, protected] |
These are the unsigned, signed, and float sort routines. The ones without an index variable don't sort an index array along with the main array.
| static void UT_QuickSort::urecurse | ( | void * | input, | |
| size_t | size, | |||
| int | len, | |||
| char * | tinput | |||
| ) | [static, protected] |
| static void UT_QuickSort::urecurse | ( | unsigned int * | input, | |
| int | len | |||
| ) | [static, protected] |
| static void UT_QuickSort::urecurse | ( | unsigned int * | input, | |
| int * | index, | |||
| int | len | |||
| ) | [static, protected] |
UT_IntArray UT_QuickSort::myIndices [protected] |
Definition at line 96 of file UT_QuickSort.h.
1.5.9