33 #include <casacore/casa/aips.h> 34 #include <casacore/casa/Utilities/ValType.h> 35 #include <casacore/casa/Containers/Block.h> 36 #include <casacore/casa/Utilities/Compare.h> 37 #include <casacore/casa/Utilities/CountedPtr.h> 42 template<
class T>
class Vector;
272 Sort (
const void* data,
uInt elementSize);
315 void sortKey (
const void* data, DataType,
uInt increment = 0,
319 void sortKey (
uInt offset, DataType,
Order = Ascending);
357 void addKey (
const void* data, DataType,
uInt nr,
int options);
379 void qkSort (
Int nr,
uInt* indices)
const;
389 void siftDown (
Int low,
Int up,
uInt* indices)
const;
392 int compare (
uInt index1,
uInt index2)
const;
395 inline void swap (
Int index1,
Int index2,
uInt* indices)
const;
StatsData< AccumType > copy(const StatsData< AccumType > &stats)
Order
Enumerate the sort order:
int order_p
sort order; -1 = ascending, 1 = descending
Sort on one or more keys, ascending and/or descending.
int order() const
Get the sort order.
Referenced counted pointer for constant data.
void swap(Int index1, Int index2, uInt *indices) const
Swap 2 indices.
Option
Enumerate the sort options:
bool Bool
Define the standard types used by Casacore.
SortKey(const void *data, const CountedPtr< BaseCompare > &, uInt increment, int order)
Define a sort key in a given data array using the indicated comparison object, stride and sort order...
A drop-in replacement for Block<T*>.
SortKey & operator=(const SortKey &)
Assignment (copy semantics).
CountedPtr< BaseCompare > ccmpObj_p
comparison object; use CountedPtr for memory management
abstract base class for comparing two objects
BaseCompare * cmpObj_p
comparison object; use raw pointer for performance
uInt incr_p
increment for next data point
const void * data_p
address of first data point
PtrBlock< SortKey * > keys_p
this file contains all the compiler specific defines
uInt tryGenSort(Vector< uInt > &indexVector, uInt nrrec, int opt) const
Try if GenSort can be used for this single key.