Namespaces
Variants
Actions

std::unordered_map<Key,T,Hash,KeyEqual,Allocator>::max_load_factor

From cppreference.com
 
C++
 
Containers library
 
std::unordered_map
float max_load_factor() const;
(1) (since C++11)
void max_load_factor( float ml );
(2) (since C++11)

Manages the maximum load factor (number of elements per bucket). The container automatically increases the number of buckets if the load factor exceeds this threshold.

1) Returns current maximum load factor.
2) Sets the maximum load factor to ml.

Contents

[edit] Parameters

ml - new maximum load factor setting

[edit] Return value

1) Current maximum load factor.
2) (none)

[edit] Complexity

Constant.

[edit] See also

returns average number of elements per bucket
(public member function) [edit]

Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!

Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant