W3cubDocs

/C++

std::unordered_set<Key,Hash,KeyEqual,Allocator>::load_factor

float load_factor() const;
(since C++11)

Returns the average number of elements per bucket, that is, size() divided by bucket_count().

Parameters

(none).

Return value

Average number of elements per bucket.

Complexity

Constant.

See also

(C++11)
manages maximum average number of elements per bucket
(public member function)

© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
https://en.cppreference.com/w/cpp/container/unordered_set/load_factor