Main Page | Namespace List | Class Hierarchy | Data Structures | Directories | File List | Data Fields | Globals

sort.h File Reference

Go to the source code of this file.

Functions

template<class T>
void _binary_sort (T *_P, T *_Q, T s)
template<class T, class S>
void _binary_sort_copy (T *_P, T *_Q, S *_U, S *_V, T s)
template<class T>
void _binary_sort_sort (T *_P, T *_Q, T *_A, T *_B, T s, T t)
template<class T, class S>
void _binary_sort_sort_copy (T *_P, T *_Q, T *_A, T *_B, S *_U, S *_V, T s, T t)
template<class T, class S>
void _fractal_sort_sort_copy (T *_P, T *_Q, T *_A, T *_B, S *_U, S *_V, T s, T t)
template<class T>
_binary_log (const T *P, const T *Q)
template<class T>
void binary_sort (vector< T > &_V)
template<class T, class S>
void binary_sort_copy (vector< T > &_V, vector< S > &_W)
template<class T>
void binary_sort_sort (vector< T > &_V, vector< T > &_W)
template<class T, class S>
void binary_sort_sort_copy (vector< T > &_V, vector< T > &_W, vector< S > &_A)
template<class T, class S>
void fractal_sort_sort_copy (vector< T > &_V, vector< T > &_W, vector< S > &_A)
template<class T, class S>
void bucket_sort_count (const vector< T > &_U, vector< S > &_W)
template<class T>
bucket_sort_size (const vector< T > &_U)
template<class T>
void bucket_sort_offset (const vector< T > &_U, vector< T > &_W)
template<class T, class S, class C>
void bucket_sort_copy (const vector< T > &_U, const vector< C > &_A, vector< C > &_B, vector< S > _W, int _n)
template<class T>
void unique (vector< T > &_P)
template<class T, class S>
void unique_accumulate (vector< T > &_P, vector< S > &_A)
template<class T, class S>
void unique_accumulate (vector< T > &_P, vector< T > &_U, vector< S > &_A)
template<class T>
void global_intersection (const int _size, const int _rank, const vector< T > &_P, const vector< T > &_U, vector< T > &_A, vector< T > &_C, vector< T > &_D)


Function Documentation

template<class T>
T _binary_log const T *  P,
const T *  Q
[inline]
 

Private procedure, see binary_sort.

template<class T>
void _binary_sort T *  _P,
T *  _Q,
s
[inline]
 

Private procedure, see binary_sort.

template<class T, class S>
void _binary_sort_copy T *  _P,
T *  _Q,
S *  _U,
S *  _V,
s
[inline]
 

Private procedure, see binary_sort_copy.

template<class T>
void _binary_sort_sort T *  _P,
T *  _Q,
T *  _A,
T *  _B,
s,
t
[inline]
 

Private procedure, see binary_sort_sort.

template<class T, class S>
void _binary_sort_sort_copy T *  _P,
T *  _Q,
T *  _A,
T *  _B,
S *  _U,
S *  _V,
s,
t
[inline]
 

Private procedure, see binary_sort_sort_copy.

template<class T, class S>
void _fractal_sort_sort_copy T *  _P,
T *  _Q,
T *  _A,
T *  _B,
S *  _U,
S *  _V,
s,
t
[inline]
 

Private procedure, see fractal_sort_sort_copy.

template<class T>
void binary_sort vector< T > &  _V  )  [inline]
 

The binary_sort procedure sorts a vector of nonnegative integers in place in ascending order.

Parameters:
_V Input: Vector of nonnegative integers to sort. Output: Sorted vector in ascending order.

template<class T, class S>
void binary_sort_copy vector< T > &  _V,
vector< S > &  _W
[inline]
 

The binary_sort_copy procedure partially sorts pairs in place in ascending order only looking at the first argument.

Parameters:
_V Input: Vector of nonnegative integers to sort, first argument. Output: Partially sorted vector in ascending order, first argument.
_W Input: Vector of arbitrary type to sort, second argument. Output: Partially sorted vector in ascending order, second argument.

template<class T>
void binary_sort_sort vector< T > &  _V,
vector< T > &  _W
[inline]
 

The binary_sort_sort procedure sorts pairs of nonnegative integers in place in lexicographic order looking at both arguments.

Parameters:
_V Input: Vector of nonnegative integers to sort, first argument. Output: Sorted vector in ascending order, first argument.
_W Input: Vector of nonnegative integers to sort, second argument. Output: Sorted vector in ascending order, second argument.

template<class T, class S>
void binary_sort_sort_copy vector< T > &  _V,
vector< T > &  _W,
vector< S > &  _A
[inline]
 

The binary_sort_sort_copy procedure partially sorts triples in place in lexicographic order only looking at the first and second argument.

Parameters:
_V Input: Vector of nonnegative integers to sort, first argument. Output: Partially sorted vector in ascending order, first argument.
_W Input: Vector of nonnegative integers to sort, second argument. Output: Partially sorted vector in ascending order, second argument.
_A Input: Vector of arbitrary type to sort, third argument. Output: Partially sorted vector in ascending order, third argument.

template<class T, class S, class C>
void bucket_sort_copy const vector< T > &  _U,
const vector< C > &  _A,
vector< C > &  _B,
vector< S >  _W,
int  _n
[inline]
 

The bucket_sort_copy procedure partially sorts pairs in ascending order only looking at the first argument and with partial output.

Parameters:
_U Input: Vector to sort, first argument.
_A Input: Vector to sort, second argument.
_B Output: Sorted vector in ascending order, second argument.
_W Input: Vector of displacements. Output: Vector of final displacements.
_n Input: Size of second argument.

template<class T, class S>
void bucket_sort_count const vector< T > &  _U,
vector< S > &  _W
[inline]
 

The bucket_sort_count procedure counts how often an index appears in the first vector and stores the counts in the second.

Parameters:
_U Input: Vector of indices.
_W Input: Vector initialized to zero. Output: Sorted Vector of index counts.

template<class T>
void bucket_sort_offset const vector< T > &  _U,
vector< T > &  _W
[inline]
 

The bucket_sort_offset procedure calculates the displacements from a vector of counts.

Parameters:
_U Input: Vector of counts.
_W Output: Vector of displacements.

template<class T>
T bucket_sort_size const vector< T > &  _U  )  [inline]
 

The bucket_sort_size function calculates the sum over all elements in the vector.

Parameters:
_U Input: Vector of counts.
Returns:
Output: Sum over all elements in the vector.

template<class T, class S>
void fractal_sort_sort_copy vector< T > &  _V,
vector< T > &  _W,
vector< S > &  _A
[inline]
 

The fractal_sort_sort_copy procedure partially sorts triples in place in fractal order only looking at the first and second argument.

Parameters:
_V Input: Vector of nonnegative integers to sort, first argument. Output: Partially sorted vector in ascending order, first argument.
_W Input: Vector of nonnegative integers to sort, second argument. Output: Partially sorted vector in ascending order, second argument.
_A Input: Vector of arbitrary type to sort, third argument. Output: Partially sorted vector in ascending order, third argument.

template<class T>
void global_intersection const int  _size,
const int  _rank,
const vector< T > &  _P,
const vector< T > &  _U,
vector< T > &  _A,
vector< T > &  _C,
vector< T > &  _D
[inline]
 

The global_intersection procedure calculates the intersection of multiple index sets.

Parameters:
_size Input: Total number of processes.
_rank Input: Rank of the current process.
_P Input: Vector of global node numbers of the current process to intersect.
_U Input: Vector of local node numbers of the current process.
_A Input: Vector of global node numbers for all processes to intersect. Output: Vector of intersecting sets with local node numbers for all processes.
_C Input: Vector of initial counts. Output: Vector of final counts for intersecting sets.
_D Input: Vector of initial displacements. Output: Vector of final displacements for intersecting sets.

template<class T>
void unique vector< T > &  _P  )  [inline]
 

The unique procedure calculates the set union of an in ascending order sorted vector.

Parameters:
_P Input: Vector sorted in ascending order. Output: Vector sorted in ascending order with only unique elements.

template<class T, class S>
void unique_accumulate vector< T > &  _P,
vector< T > &  _U,
vector< S > &  _A
[inline]
 

The unique_accumulate procedure calculates a partial set union of triples only looking at the first and second argument and accumulates the values of the third argument of partially matching triples.

Parameters:
_P Input: Vector sorted in lexicographic order, first argument. Output: Vector sorted in lexicographic order with only unique elements, first argument.
_U Input: Vector sorted in lexicographic order, second argument. Output: Vector sorted in lexicographic order with only unique elements, second argument.
_A Input: Vector to accumulate, third argument. Output: Vector of accumulated values, third argument.

template<class T, class S>
void unique_accumulate vector< T > &  _P,
vector< S > &  _A
[inline]
 

The unique_accumulate procedure calculates a partial set union of pairs only looking at the first argument and accumulates the values of the second argument of partially matching pairs.

Parameters:
_P Input: Vector sorted in ascending order, first argument. Output: Vector sorted in ascending order with only unique elements, first argument.
_A Input: Vector to accumulate, second argument. Output: Vector of accumulated values, second argument.


Generated on Wed Apr 26 17:41:45 2006 for Parallel Toolbox by  doxygen 1.4.2