std::unordered_map::rehash
来自cppreference.com
< cpp | container | unordered map
该页由英文版wiki使用Google Translate机器翻译而来。
该翻译可能存在错误或用词不当。鼠标停留在文本上可以看到原版本。你可以帮助我们修正错误或改进翻译。参见说明请点击这里. |
void rehash( size_type count ); |
(C++11 起) | |
Sets the number of buckets to count
and rehashes the container, i.e. puts the elements into appropriate buckets considering that total number of buckets has changed. If the new number of buckets makes load factor more than maximum load factor (count < size() / max_load_factor()), then the new number of buckets is at least size() / max_load_factor().
目录 |
[编辑] 参数
count | - | new number of buckets |
[编辑] 返回值
(无)
[编辑] 复杂性
平均情况下的线性尺寸的容器中,最坏的情况下二次.
原文:
average case linear in the size of the container, worst case quadratic.
[编辑] 另请参阅
保留空间至少指定数量的elements. This重新生成哈希表. 原文: reserves space for at least the specified number of elements. This regenerates the hash table. (公共成员函数) |