12 #ifndef MFEM_SORT_PAIRS
13 #define MFEM_SORT_PAIRS
15 #include "../config/config.hpp"
22 template <
class A,
class B>
33 template <
class A,
class B>
34 bool operator<(const Pair<A,B> &p,
const Pair<A,B> &q)
36 return (p.one < q.one);
40 template <
class A,
class B>
47 template <
class A,
class B>
50 std::sort(pairs, pairs + size);
54 template <
class A,
class B,
class C>
64 template <
class A,
class B,
class C>
67 return (p.one < q.one ||
69 (p.two < q.two || (!(q.two < p.two) && p.three < q.three))));
73 template <
class A,
class B,
class C>
76 std::sort(triples, triples + size);
Pair(const A &one, const B &two)
bool operator==(const Array< T > &LHS, const Array< T > &RHS)
void SortTriple(Triple< A, B, C > *triples, int size)
Lexicographic sort for arrays of class Triple.
void SortPairs(Pair< A, B > *pairs, int size)
Sort an array of Pairs with respect to the first element.