38 #ifndef HPP_FCL_BROADPHASE_SPARSEHASHTABLE_INL_H
39 #define HPP_FCL_BROADPHASE_SPARSEHASHTABLE_INL_H
49 template <
typename Key,
typename Data,
typename HashFnc,
50 template <
typename,
typename>
class TableT>
57 template <
typename Key,
typename Data,
typename HashFnc,
58 template <
typename,
typename>
class TableT>
64 template <
typename Key,
typename Data,
typename HashFnc,
65 template <
typename,
typename>
class TableT>
67 std::vector<unsigned int> indices = h_(key);
68 for (
size_t i = 0; i < indices.size(); ++i)
69 table_[indices[i]].push_back(
value);
73 template <
typename Key,
typename Data,
typename HashFnc,
74 template <
typename,
typename>
class TableT>
77 std::vector<unsigned int> indices = h_(key);
78 std::set<Data> result;
79 for (
size_t i = 0; i < indices.size(); ++i) {
80 unsigned int index = indices[i];
81 typename Table::const_iterator p = table_.find(
index);
82 if (p != table_.end()) {
83 std::copy((*p).second.begin(), (*p).second.end(),
84 std ::inserter(result, result.end()));
88 return std::vector<Data>(result.begin(), result.end());
92 template <
typename Key,
typename Data,
typename HashFnc,
93 template <
typename,
typename>
class TableT>
95 std::vector<unsigned int> indices = h_(key);
96 for (
size_t i = 0; i < indices.size(); ++i) {
97 unsigned int index = indices[i];
103 template <
typename Key,
typename Data,
typename HashFnc,
104 template <
typename,
typename>
class TableT>