std::unorde...load_factor(3)

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

πŸ’– NAME πŸ’–

okay bestie, we're on the std::unorde...load_factor(3) page in the C++ Standard Libary manual. The name is literally std::unordered_multimap::load_factor - std::unordered_multimap::load_factor β€” yes, it said it twice, and honestly? iconic. πŸ’…


✨ Synopsis ✨

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

Returns the average number of elements per bucket, that is, size() divided by bucket_count(). it's giving "math but make it container vibes" fr fr. since C++11, periodt. πŸ¦‹


πŸŽ€ Parameters πŸŽ€

  • (none) β€” literally zero parameters, not a single one, bestie. πŸ™ˆ

🌸 Return value 🌸

Average number of elements per bucket. that's the tea. πŸ“


πŸ”₯ Complexity πŸ”₯

Constant. no cap, it's not doing a little marathon. ⭐


πŸ‘‘ See also πŸ‘‘

  • max_load_factor β€” manages maximum average number of elements per bucket (public member function). sibling behavior, we love to see it. 🫢

k bye, this cutie came from cppreference.com and is dated 2024.06.10 πŸ’–βœ¨

πŸ“¦ where this page comes from