casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions
casa::GenSort_global_functions_genSortIndirect Struct Reference

Global indirect sort functions The following global functions easier to use than the static GenSortIndirect member functions. More...

#include <GenSort.h>

List of all members.

Public Member Functions

template<class T >
uInt genSort (Vector< uInt > &indexVector, const T *data, uInt nr)
 Indirect sort in ascending order using QuickSort.
template<class T >
uInt genSort (Vector< uInt > &indexVector, const Array< T > &data)
template<class T >
uInt genSort (Vector< uInt > &indexVector, const Block< T > &data)
template<class T >
uInt genSort (Vector< uInt > &indexVector, const Block< T > &data, uInt nr)
template<class T >
uInt genSort (Vector< uInt > &indexVector, const T *data, uInt nr, int options)
 Indirect sort in ascending order using given option.
template<class T >
uInt genSort (Vector< uInt > &indexVector, const Array< T > &data, int options)
template<class T >
uInt genSort (Vector< uInt > &indexVector, const Block< T > &data, int options)
template<class T >
uInt genSort (Vector< uInt > &indexVector, const Block< T > &data, uInt nr, int options)
template<class T >
uInt genSort (Vector< uInt > &indexVector, const T *data, uInt nr, Sort::Order order)
 Indirect sort in given order using QuickSort.
template<class T >
uInt genSort (Vector< uInt > &indexVector, const Array< T > &data, Sort::Order order)
template<class T >
uInt genSort (Vector< uInt > &indexVector, const Block< T > &data, Sort::Order order)
template<class T >
uInt genSort (Vector< uInt > &indexVector, const Block< T > &data, uInt nr, Sort::Order order)
template<class T >
uInt genSort (Vector< uInt > &indexVector, const T *data, uInt nr, Sort::Order order, int options)
 Indirect sort in given order using given option.
template<class T >
uInt genSort (Vector< uInt > &indexVector, Array< T > &data, Sort::Order order, int options)
template<class T >
uInt genSort (Vector< uInt > &indexVector, const Block< T > &data, Sort::Order order, int options)
template<class T >
uInt genSort (Vector< uInt > &indexVector, const Block< T > &data, uInt nr, Sort::Order order, int options)

Detailed Description

Global indirect sort functions The following global functions easier to use than the static GenSortIndirect member functions.

They do an indirect sort of data, thus the data themselves are not moved. Rather an index vector is returned giving the sorted data indices.

The default sorting method is QuickSort, which is the fastest. However, there are pathological cases where it can be slow. HeapSort is about twice a slow, but its speed is guaranteed. InsSort (insertion sort) can be very, very slow.

Unlike the (see (name=genSortInPlace)) in-place sorting methods , all indirect sorting methods are stable (i.e. equal values are left in their original order).

All sort methods have an option to skip duplicate values. This is the only case where the returned number of values can be less than the original number of values.

Definition at line 405 of file GenSort.h.


Member Function Documentation

template<class T >
uInt casa::GenSort_global_functions_genSortIndirect::genSort ( Vector< uInt > &  indexVector,
const T *  data,
uInt  nr 
) [inline]

Indirect sort in ascending order using QuickSort.

Definition at line 410 of file GenSort.h.

References casa::Sort::Ascending, casa::Sort::QuickSort, and casa::GenSortIndirect< T >::sort().

template<class T >
uInt casa::GenSort_global_functions_genSortIndirect::genSort ( Vector< uInt > &  indexVector,
const Array< T > &  data 
) [inline]
template<class T >
uInt casa::GenSort_global_functions_genSortIndirect::genSort ( Vector< uInt > &  indexVector,
const Block< T > &  data 
) [inline]
template<class T >
uInt casa::GenSort_global_functions_genSortIndirect::genSort ( Vector< uInt > &  indexVector,
const Block< T > &  data,
uInt  nr 
) [inline]
template<class T >
uInt casa::GenSort_global_functions_genSortIndirect::genSort ( Vector< uInt > &  indexVector,
const T *  data,
uInt  nr,
int  options 
) [inline]

Indirect sort in ascending order using given option.

This option gives the sort method (Sort::QuickSort, Sort::HeapSort, or Sort::InsSort) and/or the option Sort::NoDuplicates.

Definition at line 439 of file GenSort.h.

References casa::Sort::Ascending, and casa::GenSortIndirect< T >::sort().

template<class T >
uInt casa::GenSort_global_functions_genSortIndirect::genSort ( Vector< uInt > &  indexVector,
const Array< T > &  data,
int  options 
) [inline]

Definition at line 444 of file GenSort.h.

References casa::Sort::Ascending, and casa::GenSortIndirect< T >::sort().

template<class T >
uInt casa::GenSort_global_functions_genSortIndirect::genSort ( Vector< uInt > &  indexVector,
const Block< T > &  data,
int  options 
) [inline]
template<class T >
uInt casa::GenSort_global_functions_genSortIndirect::genSort ( Vector< uInt > &  indexVector,
const Block< T > &  data,
uInt  nr,
int  options 
) [inline]

Definition at line 454 of file GenSort.h.

References casa::Sort::Ascending, and casa::GenSortIndirect< T >::sort().

template<class T >
uInt casa::GenSort_global_functions_genSortIndirect::genSort ( Vector< uInt > &  indexVector,
const T *  data,
uInt  nr,
Sort::Order  order 
) [inline]

Indirect sort in given order using QuickSort.

The order must be Sort::Ascending or Sort::Descending.

Definition at line 465 of file GenSort.h.

References casa::Sort::QuickSort, and casa::GenSortIndirect< T >::sort().

template<class T >
uInt casa::GenSort_global_functions_genSortIndirect::genSort ( Vector< uInt > &  indexVector,
const Array< T > &  data,
Sort::Order  order 
) [inline]

Definition at line 471 of file GenSort.h.

References casa::Sort::QuickSort, and casa::GenSortIndirect< T >::sort().

template<class T >
uInt casa::GenSort_global_functions_genSortIndirect::genSort ( Vector< uInt > &  indexVector,
const Block< T > &  data,
Sort::Order  order 
) [inline]
template<class T >
uInt casa::GenSort_global_functions_genSortIndirect::genSort ( Vector< uInt > &  indexVector,
const Block< T > &  data,
uInt  nr,
Sort::Order  order 
) [inline]

Definition at line 483 of file GenSort.h.

References casa::Sort::QuickSort, and casa::GenSortIndirect< T >::sort().

template<class T >
uInt casa::GenSort_global_functions_genSortIndirect::genSort ( Vector< uInt > &  indexVector,
const T *  data,
uInt  nr,
Sort::Order  order,
int  options 
) [inline]

Indirect sort in given order using given option.

This option gives the sort method (Sort::QuickSort, Sort::HeapSort, or Sort::InsSort) and/or the option Sort::NoDuplicates. The order must be Sort::Ascending or Sort::Descending.

Definition at line 496 of file GenSort.h.

References casa::GenSortIndirect< T >::sort().

template<class T >
uInt casa::GenSort_global_functions_genSortIndirect::genSort ( Vector< uInt > &  indexVector,
Array< T > &  data,
Sort::Order  order,
int  options 
) [inline]

Definition at line 502 of file GenSort.h.

References casa::GenSortIndirect< T >::sort().

template<class T >
uInt casa::GenSort_global_functions_genSortIndirect::genSort ( Vector< uInt > &  indexVector,
const Block< T > &  data,
Sort::Order  order,
int  options 
) [inline]
template<class T >
uInt casa::GenSort_global_functions_genSortIndirect::genSort ( Vector< uInt > &  indexVector,
const Block< T > &  data,
uInt  nr,
Sort::Order  order,
int  options 
) [inline]

Definition at line 513 of file GenSort.h.

References casa::GenSortIndirect< T >::sort().


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