38 #ifndef COAL_BROADPHASE_SPARSEHASHTABLE_INL_H
39 #define COAL_BROADPHASE_SPARSEHASHTABLE_INL_H
48 template <
typename Key,
typename Data,
typename HashFnc,
49 template <
typename,
typename>
class TableT>
56 template <
typename Key,
typename Data,
typename HashFnc,
57 template <
typename,
typename>
class TableT>
63 template <
typename Key,
typename Data,
typename HashFnc,
64 template <
typename,
typename>
class TableT>
66 std::vector<unsigned int> indices = h_(key);
67 for (
size_t i = 0; i < indices.size(); ++i)
68 table_[indices[i]].push_back(
value);
72 template <
typename Key,
typename Data,
typename HashFnc,
73 template <
typename,
typename>
class TableT>
76 std::vector<unsigned int> indices = h_(key);
77 std::set<Data> result;
78 for (
size_t i = 0; i < indices.size(); ++i) {
79 unsigned int index = indices[i];
80 typename Table::const_iterator p = table_.find(
index);
81 if (p != table_.end()) {
82 std::copy((*p).second.begin(), (*p).second.end(),
83 std ::inserter(result, result.end()));
87 return std::vector<Data>(result.begin(), result.end());
91 template <
typename Key,
typename Data,
typename HashFnc,
92 template <
typename,
typename>
class TableT>
94 std::vector<unsigned int> indices = h_(key);
95 for (
size_t i = 0; i < indices.size(); ++i) {
96 unsigned int index = indices[i];
102 template <
typename Key,
typename Data,
typename HashFnc,
103 template <
typename,
typename>
class TableT>