12 #ifndef MFEM_SORT_PAIRS
13 #define MFEM_SORT_PAIRS
15 #include "../config/config.hpp"
22 template <
class A,
class B>
31 template <
class A,
class B>
35 template <
class A,
class B>
39 template <
class A,
class B,
class C>
48 template <
class A,
class B,
class C>
56 if (p -> one < q -> one) {
return -1; }
57 if (q -> one < p -> one) {
return +1; }
58 if (p -> two < q -> two) {
return -1; }
59 if (q -> two < p -> two) {
return +1; }
60 if (p -> three < q -> three) {
return -1; }
61 if (q -> three < p -> three) {
return +1; }
65 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.