Skip to main content

std::unordered_set load_factor() method

// Const version only
float load_factor() const;

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 - O(1).

Exceptions

(none)

Examples

important

This section requires improvement. You can help by editing this doc page.

This article originates from this CppReference page. It was likely altered for improvements or editors' preference. Click "Edit this page" to see all changes made to this document.
Hover to see the original license.

std::unordered_set load_factor() method

// Const version only
float load_factor() const;

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 - O(1).

Exceptions

(none)

Examples

important

This section requires improvement. You can help by editing this doc page.

This article originates from this CppReference page. It was likely altered for improvements or editors' preference. Click "Edit this page" to see all changes made to this document.
Hover to see the original license.