std::unorde..._load_factor(3)
πΈ NAME πΈ
hey bestie, welcome to the std::unorde..._load_factor(3) page π itβs from the C++ Standard Libary (their spelling, not mine π) and itβs all about std::unordered_map::max_load_factor. The NAME section is literally the same name twice: std::unordered_map::max_load_factor β std::unordered_map::max_load_factor. iconic π
β¨ Synopsis β¨
Two overloads, both since C++11 β yes maβam π
float max_load_factor() const; (1) (since C++11)
void max_load_factor( float ml ); (2) (since C++11)
okay so this function manages the maximum load factor β thatβs literally the number of elements per bucket π¦ The container automatically increases the number of buckets if the load factor exceeds this threshold. periodt.
- Returns the current maximum load factor.
- Sets the maximum load factor to
ml.
π Parameters π
mlβ new maximum load factor setting
π Return value π
- Current maximum load factor.
- (none) β like, literally nothing returned, bestie π
π«Ά Complexity π«Ά
Constant. no notes, just constant energy β¨
π See also π
load_factorβ returns average number of elements per bucket (public member function)
π thatβs the whole page! source: http://cppreference.com, version/date: 2024.06.10, page tag: std::unorde..._load_factor(3). mwah π
π¦ 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