std::unorde...imap::rehash(3)
okay so bestie, we're in the C++ Standard Libary manual β page std::unorde...imap::rehash(3) β and the main character is std::unordered_multimap::rehash. The header is doing its shortened little thing, but the full name is right below. π
π NAME π
std::unordered_multimap::rehash - std::unordered_multimap::rehash. That's it, that's the name, no cap. π
β¨ Synopsis β¨
void rehash( size_type count ); (since C++11)
Okay so rehash changes the number of buckets to a value n that is not less than count and satisfies n >= size() / max_load_factor(), then rehashes the container β i.e. puts the elements into appropriate buckets considering that total number of buckets has changed. slay. β¨
πΈ Parameters πΈ
countβ lower bound for the new number of buckets. periodt. π
π Return value π
(none) β literally nothing coming back, bestie. π
π¦ Complexity π¦
Average case linear in the size of the container, worst case quadratic. That worst case is giving βhandle with careβ energy, ngl. π
π Notes π
rehash(0) may be used to force an unconditional rehash, such as after suspension of automatic rehashing by temporarily increasing max_load_factor(). Lowkey iconic little escape hatch, iykyk. β¨
π See also π
reserveβ reserves space for at least the specified number of elements and regenerates the hash table (public member function). π«Ά
okay bestie, that's the page π«Ά β source: http://cppreference.com Β· version/date: 2024.06.10 Β· page: std::unorde...imap::rehash(3). C++ Standard Libary manual out. π
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms