12 #ifndef MFEM_SORT_PAIRS
13 #define MFEM_SORT_PAIRS
15 #include "../config/config.hpp"
22 template <
class A,
class B>
35 template <
class A,
class B>
38 return (
p.one < q.one);
42 template <
class A,
class B>
49 template <
class A,
class B>
52 std::sort(pairs, pairs + size);
56 template <
class A,
class B,
class C>
67 : one(one), two(two), three(three) { }
71 template <
class A,
class B,
class C>
74 return (
p.one < q.one ||
76 (
p.two < q.two || (!(q.two <
p.two) &&
p.three < q.three))));
80 template <
class A,
class B,
class C>
83 std::sort(triples, triples + size);
Triple(const A &one, const B &two, const C &three)
Pair(const A &one, const B &two)
double p(const Vector &x, double t)
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.