Namespaces | |
namespace | GeoSort |
Functions | |
template<class ARRAY_TYPE, class TYPE> | |
void | GeoSort::ReverseOrder (ARRAY_TYPE &Array) |
Reverses the order of an array. | |
template<class ARRAY_TYPE, class TYPE, typename COMPTYPE> | |
void | GeoSort::FQuickSort (ARRAY_TYPE &Array, COMPTYPE(TYPE::*pFunctionCall)(void) const) |
Wrapper for the function call sort. | |
template<class ARRAY_TYPE, class TYPE, typename COMPTYPE> | |
void | GeoSort::FQuickSort (ARRAY_TYPE &Array, COMPTYPE(TYPE::*pFunctionCall)(void) const , int lo0, int hi0) |
Sorts an array by calling a function for each object in the array e.g. GetLength(). | |
template<class ARRAY_TYPE, class TYPE> | |
void | GeoSort::FQuickSort (ARRAY_TYPE &Array, bool(*pSwitchIfTrue)(TYPE &, TYPE &)) |
Wrapper for the function based sort. | |
template<class ARRAY_TYPE, class TYPE> | |
void | GeoSort::FQuickSort (ARRAY_TYPE &Array, bool(*pSwitchIfTrue)(TYPE &, TYPE &), int lo0, int hi0) |
Sorts an array by calling a function which takes 2 objects in the array and returns true if the first should be ordered after the second. | |
template<class ARRAY_TYPE, class TYPE> | |
void | GeoSort::SQuickSort (ARRAY_TYPE &Array) |
Wrapper for a simple quicksort. | |
template<class ARRAY_TYPE, class TYPE> | |
void | GeoSort::SQuickSort (ARRAY_TYPE &Array, int lo0, int hi0) |
Straight forward quicksort. | |
template<class ARRAY_TYPE, class TYPE, class PARRAY_TYPE, class PTYPE> | |
void | GeoSort::PQuickSort (ARRAY_TYPE &Array, PARRAY_TYPE &ParallelArray) |
Wrapper for a Parallel quicksort. | |
template<class ARRAY_TYPE, class TYPE, class PARRAY_TYPE, class PTYPE> | |
void | GeoSort::PQuickSort (ARRAY_TYPE &Array, PARRAY_TYPE &ParArray, int lo0, int hi0) |
Parallel quicksort which sorts the first array by its elements whilst also sorting the second in the same way. |
--------------------------------------------------------------------------
File for a number of sorting algothithms, all of which sort items using the quick sort algorithm. Main algorithms as follows: 1. Simple sort which sorts items in ascending order. 2. Parallel sort which sorts items according to one array whilst sorting another in Parallel. 3. A sort which uses a function call of the class being sorted e.g. GetLength(). 4. A sort which uses a function to determine which item out of 2 should come first in the array.
Any type of array can be sorted using the functions which ask to specify the limits of the sort (normally between the 0 and max element) but for convienience, there are wrapper functions for all which sort between the 0 element and that given by the size() function of the array less 1.
---------------------------------------------------------------------------