__GNU_PBDS::DIRECT_MOD_RANGE_HASHING(3cxx)

🌸 __gnu_pbds::direct_mod_range_hashing< Size_Type > β€” NAME πŸ’…

okay so bestie, this whole page lives in the 3cxx manual section (that's the GNU C++ library corner of the man world, iykyk) and it's about:

__gnu_pbds::direct_mod_range_hashing< Size_Type > β€” a mod range-hashing class (uses the modulo function). That's literally it. Mod. Range. Hashing. She's an icon, she's iconic, she does the modulo thing ✨


πŸ¦‹ SYNOPSIS

#include <hash_policy.hpp>

Inherits __gnu_pbds::detail::mod_based_range_hashing< Size_Type >. Yeah she got it from her mama πŸ’–

πŸ‘‘ Public Types

  • typedef Size_Type size_type β€” the size type, no cap

πŸŽ€ Public Member Functions

  • void swap (direct_mod_range_hashing< Size_Type > &other) β€” swaps with other, classic swap behaviour, slay

πŸ”’ Protected Member Functions

  • void notify_resized (size_type size) β€” gets told about a resize, lowkey important
  • size_type operator() (size_type hash) const β€” Transforms the __hash value hash into a ranged-hash value (using a modulo operation). she does math fr fr πŸ”₯
  • size_type range_hash (size_type s) const β€” the range hashing itself, protected, so hands off unless you're family πŸ™ˆ
  • void swap (mod_based_range_hashing &other) β€” the inherited swap, still here, still doing her thing

✨ Detailed Description

template<typename Size_Type = std::size_t>
    class __gnu_pbds::direct_mod_range_hashing< Size_Type >

"A mod range-hashing class (uses the modulo operation)." That's the whole personality. Default Size_Type is std::size_t, in case you were wondering, and you were wondering 🫢


πŸ’œ Member Function Documentation

operator()

template<typename Size_Type  = std::size_t> size_type
    __gnu_pbds::direct_mod_range_hashing< Size_Type >::operator() (size_type
    hash) const [inline],  [protected]

Transforms the __hash value hash into a ranged-hash value (using a modulo operation). Inline, protected, and honestly kind of the main character here πŸ‘‘

heads up: it's protected and inline β€” so don't come for her from the outside, she's not available like that πŸ’€

🧚 Author

Generated automatically by Doxygen for libstdc++ from the source code.


okay bestie that's the whole page, every flag, every type, every size_type, every swap, all of it, nothing skipped, periodt πŸ’…

✨ proud of you for reading a whole manpage ✨ β€” this was the libstdc++ 3cxx page for __gnu_pbds::direct_mod_range_hashing< Size_Type >, generated by Doxygen from the source code, and that's the cute little sign-off πŸŽ€πŸŒΈ