#ifndef _SORTALL_H #define _SORTALL_H #include "apvector.h" #include "comparer.h" // ****************** // prototypes for sort functions // author: Owen Astrachan // 7/21/98 // // see also: comparer.h, sortall.cpp // // for "plain" sorts, the type being sorted // must be comparable with < and for Merge and Quick also with <= // for sorts with the Comparer template parameter the type // for Comparer (see comparer.h) must have a member function // named compare that takes two const Type arguments: lhs, rhs, // and which returns -1, 0, or +1 if lhs <, ==, > rhs, respectively // // ******************* template void InsertSort(apvector & a, int size); template void InsertSort(apvector & a, int size, const Comparer & comp); template void SelectSort(apvector & a, int size, const Comparer & comp); template void SelectSort(apvector & a, int size); template void MergeSort(apvector & a,int n); template void MergeSort(apvector & a, int n, const Comparer & comp); #include "sortall.cpp" #endif