|
static uInt | sort (Vector< uInt > &indexVector, const T *data, uInt nr, Sort::Order=Sort::Ascending, int options=Sort::QuickSort) |
| Sort a C-array containing nr T -type objects. More...
|
|
static uInt | sort (Vector< uInt > &indexVector, const Array< T > &data, Sort::Order=Sort::Ascending, int options=Sort::QuickSort) |
| Sort a C-array containing nr T -type objects. More...
|
|
static uInt | sort (Vector< uInt > &indexVector, const Block< T > &data, uInt nr, Sort::Order=Sort::Ascending, int options=Sort::QuickSort) |
| Sort a C-array containing nr T -type objects. More...
|
|
static uInt | kthLargest (T *data, uInt nr, uInt k) |
| Find the index of the k-th largest value. More...
|
|
static uInt | quickSort (uInt *inx, const T *data, uInt nr, Sort::Order, int options) |
| Sort container using quicksort. More...
|
|
static uInt | heapSort (uInt *inx, const T *data, uInt nr, Sort::Order, int options) |
| Sort container using heapsort. More...
|
|
static uInt | insSort (uInt *inx, const T *data, uInt nr, Sort::Order, int options) |
| Sort container using insertion sort. More...
|
|
static uInt | parSort (uInt *inx, const T *data, uInt nr, Sort::Order, int options, int nthreads=0) |
| Sort container using parallel merge sort (using OpenMP). More...
|
|
|
static void | swapInx (uInt &index1, uInt &index2) |
| Swap 2 indices. More...
|
|
static uInt * | merge (const T *data, uInt *inx, uInt *tmp, uInt nrrec, uInt *index, uInt nparts) |
| Thedata buffer is divided in nparts parts. More...
|
|
static int | isAscending (const T *data, Int index1, Int index2) |
| Check if 2 values are in ascending order. More...
|
|
static void | quickSortAsc (uInt *inx, const T *, Int nr, Bool multiThread=False, Int rec_lim=128) |
| Quicksort in ascending order. More...
|
|
static void | heapSortAsc (uInt *inx, const T *, Int nr) |
| Heapsort in ascending order. More...
|
|
static void | heapAscSiftDown (uInt *inx, Int, Int, const T *) |
| Helper function for ascending heapsort. More...
|
|
static uInt | insSortAsc (uInt *inx, const T *, Int nr, int option) |
| Insertion sort in ascending order. More...
|
|
static uInt | insSortAscDup (uInt *inx, const T *, Int nr) |
| Insertion sort in ascending order allowing duplicates. More...
|
|
static uInt | insSortAscNoDup (uInt *inx, const T *, Int nr) |
| Insertion sort in ascending order allowing no duplicates. More...
|
|
template<class T>
class casacore::GenSortIndirect< T >
General indirect sort functions.
Intended use:
Internal
Synopsis
This class is similar to GenSort. The only difference is that the functions in this class sort indirectly instead of in-place. They return the result of the sort as an sorted vector of indices This is slower, because an extra indirection is involved in each comparison. However, this sort allows to sort const data. Another advantage is that this sort is always stable (i.e. equal values are kept in their original order).
Definition at line 206 of file GenSort.h.