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>
32 bool operator<(const Pair<A,B> &p,
const Pair<A,B> &q)
34 return (p.one < q.one);
38 template <
class A,
class B>
41 std::sort(pairs, pairs + size);
45 template <
class A,
class B,
class C>
55 template <
class A,
class B,
class C>
58 return (p.one < q.one ||
60 (p.two < q.two || (!(q.two < p.two) && p.three < q.three))));
64 template <
class A,
class B,
class C>
67 std::sort(triples, triples + size);
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.