sort.h
Go to the documentation of this file.00001 /* ---------------------------------------------- *\ 00002 file: sort.h 00003 auth: Travis Fischer 00004 acct: tfischer 00005 date: 3/18/2007 00006 \* ---------------------------------------------- */ 00007 00008 #ifndef SORT_H_ 00009 #define SORT_H_ 00010 00011 // Note: 'b' is a scratch array of size 'n' and should be allocated by the 00012 // caller 00013 // Note: 'indices' in radixSortIndices is expected to be initialized properly 00014 // by the caller 00015 00016 template <typename T> 00017 void radixSort(T *a, T *b, const unsigned int n); 00018 00019 template <typename T> 00020 void radixSortIndices(T *a, unsigned int *indices, unsigned int *b, const unsigned int n); 00021 00022 template <typename T> 00023 void quickSort(T *a, const int p, const int q); 00024 00025 #endif // SORT_H_ 00026
Generated on 28 Feb 2009 for Milton by
1.5.6