Aikido
pair-impl.hpp
Go to the documentation of this file.
1 #ifndef AIKIDO_COMMON_DETAIL_PAIR_IMPL_HPP_
2 #define AIKIDO_COMMON_DETAIL_PAIR_IMPL_HPP_
3 
4 #include <boost/functional/hash.hpp>
5 
6 #include "aikido/common/pair.hpp"
7 
8 namespace aikido {
9 namespace common {
10 
11 //==============================================================================
12 template <typename T1, typename T2>
13 std::size_t PairHash::operator()(const std::pair<T1, T2>& pair) const
14 {
15  std::size_t hash = 0;
16  boost::hash_combine(hash, pair.first);
17  boost::hash_combine(hash, pair.second);
18 
19  return hash;
20 }
21 
22 } // namespace common
23 } // namespace aikido
24 
25 #endif // AIKIDO_COMMON_DETAIL_PAIR_IMPL_HPP_
aikido
Format of serialized trajectory in YAML.
Definition: algorithm.hpp:4
aikido::common::PairHash::operator()
std::size_t operator()(const std::pair< T1, T2 > &pair) const
Compute a hash for a pair of hashable types.
Definition: pair-impl.hpp:13
pair.hpp