19 template <
class A,
class B>
27 if (p -> one < q -> one)
return -1;
28 if (q -> one < p -> one)
return +1;
32 template <
class A,
class B>
36 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< 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 *)
void SortPairs(Pair< A, B > *pairs, int size)
Sort with respect to the first element.
template int ComparePairs< int, double >(const void *, const void *)