12 #ifndef MFEM_SORT_PAIRS
13 #define MFEM_SORT_PAIRS
15 #include "../config/config.hpp"
21 template <
class A,
class B>
30 template <
class A,
class B>
34 template <
class A,
class B>
38 template <
class A,
class B,
class C>
47 template <
class A,
class B,
class C>
55 if (p -> one < q -> one)
return -1;
56 if (q -> one < p -> one)
return +1;
57 if (p -> two < q -> two)
return -1;
58 if (q -> two < p -> two)
return +1;
59 if (p -> three < q -> three)
return -1;
60 if (q -> three < p -> three)
return +1;
64 template <
class A,
class B,
class C>
int ComparePairs(const void *_p, const void *_q)
Compare the first element of the pairs.
int CompareTriple(const void *_p, const void *_q)
void SortTriple(Triple< A, B, C > *triples, int size)
void SortPairs(Pair< A, B > *pairs, int size)
Sort with respect to the first element.