Provides drake::MakeSortedPair and drake::SortedPair for storing two values of a certain type in sorted order.
#include <algorithm>
#include <cstddef>
#include <type_traits>
#include <utility>
#include "drake/common/hash.h"
#include "drake/common/is_less_than_comparable.h"
|
template<class T > |
bool | operator== (const SortedPair< T > &x, const SortedPair< T > &y) |
| Two pairs of the same type are equal iff their members are equal after sorting. More...
|
|
template<class T > |
bool | operator< (const SortedPair< T > &x, const SortedPair< T > &y) |
| Compares two pairs using lexicographic ordering. More...
|
|
template<class T > |
bool | operator!= (const SortedPair< T > &x, const SortedPair< T > &y) |
| Determine whether two SortedPair objects are not equal using operator== . More...
|
|
template<class T > |
bool | operator> (const SortedPair< T > &x, const SortedPair< T > &y) |
| Determines whether x > y using operator< . More...
|
|
template<class T > |
bool | operator<= (const SortedPair< T > &x, const SortedPair< T > &y) |
| Determines whether x <= y using operator< . More...
|
|
template<class T > |
bool | operator>= (const SortedPair< T > &x, const SortedPair< T > &y) |
| Determines whether x >= y using operator< . More...
|
|
template<class T > |
constexpr SortedPair< typename std::decay< T >::type > | MakeSortedPair (T &&x, T &&y) |
| A convenience wrapper for creating a sorted pair from two objects. More...
|
|
template<class T > |
void | swap (drake::SortedPair< T > &t, drake::SortedPair< T > &u) |
| Implements std::swap(). More...
|
|
◆ swap()