std::unorde..._load_factor(3)

πŸ“¦ version 2024.07.05, in nixpkgs unstable, opensuse-leap 16.0

πŸŽ€ NAME πŸŽ€

okay so bestie, this is the <std::unorde..._load_factor(3)> page from the C++ Standard Libary manual. The NAME entry is:

  • std::unordered_set::max_load_factor - std::unordered_set::max_load_factor

πŸ¦‹ Synopsis πŸ¦‹

two overloads, both marked (since C++11):

float max_load_factor() const;    (1) (since C++11)
void max_load_factor( float ml ); (2) (since C++11)

this whole situation manages the maximum load factor β€” that's the number of elements per bucket, iykyk. The container automatically increases the number of buckets if the load factor exceeds this threshold. no manual bucket wrangling required ✨

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

🌸 Parameters 🌸

  • ml β€” new maximum load factor setting

πŸ’– Return value πŸ’–

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

⭐ Complexity ⭐

Constant. literally constant, bestie β€” no sneaky extra work hiding in here πŸ’…

πŸŽ€ See also πŸŽ€

  • load_factor β€” returns average number of elements per bucket (public member function)

byeee 🫢 this page came from http://cppreference.com, dated 2024.06.10, and its page id is std::unorde..._load_factor(3). slay and read your load factors responsibly πŸ’–

πŸ“¦ where this page comes from