考虑unordered_map
template<
class Key,
class T,
class Hash = std::hash<Key>,
class KeyEqual = std::equal_to<Key>,
class Allocator = std::allocator< std::pair<const Key, T> >
> class unordered_map;
我知道(a==b)比!(a<b) && !(b>a)更快,但由于unordered
康西尔我有一些桶(vector<float>)。我需要基于一些索引来访问这个桶。示例:
int indexX, indexY, indexZ, indexW;
因此,当一个新的点到达时,我需要把这个点放在正确的桶里。现在我正在做这样的事情:
// X Y Z W => Bucket
unordered_map<int, unordered_map<int, unordered_map<int, unordered_map<in