Namespaces
Variants
Views
Actions

Difference between revisions of "cpp/container/unordered set/max load factor"

From cppreference.com
m (Shorten template names. Use {{lc}} where appropriate.)
m (langlinks)
 
Line 1: Line 1:
 
{{include page|cpp/container/max_load_factor|unordered_set}}
 
{{include page|cpp/container/max_load_factor|unordered_set}}
  
[[de:cpp/container/unordered set/max load factor]]
+
deesfritjaptruzh
[[es:cpp/container/unordered set/max load factor]]
+
[[fr:cpp/container/unordered set/max load factor]]
+
[[it:cpp/container/unordered set/max load factor]]
+
[[ja:cpp/container/unordered set/max load factor]]
+
[[pt:cpp/container/unordered set/max load factor]]
+
[[ru:cpp/container/unordered set/max load factor]]
+
[[zh:cpp/container/unordered set/max load factor]]
+

Latest revision as of 08:38, 3 December 2021

 
 
 
 
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]