16 #include <HYPRE_utilities.h>
22 template <
class A,
class B>
30 if (p -> one < q -> one) {
return -1; }
31 if (q -> one < p -> one) {
return +1; }
35 template <
class A,
class B>
40 qsort (pairs, size,
sizeof(
Pair<A, B>), ComparePairs<A, B>);
int ComparePairs(const void *_p, const void *_q)
Compare the first element of the pairs.
template void SortPairs< HYPRE_Int, int >(Pair< HYPRE_Int, int > *, int)
template void SortPairs< double, int >(Pair< double, int > *, int)
template void SortPairs< int, double >(Pair< int, double > *, int)
template void SortPairs< int, int >(Pair< int, int > *, int)
template int ComparePairs< double, int >(const void *, const void *)
template int ComparePairs< int, int >(const void *, const void *)
template int ComparePairs< HYPRE_Int, int >(const void *, const void *)
void SortPairs(Pair< A, B > *pairs, int size)
Sort with respect to the first element.
template int ComparePairs< int, double >(const void *, const void *)