__GNU_PBDS::DETAIL::CC_HT_MAP(3cxx)

πŸ’– NAME πŸ’–

okay so bestie, this page is all about __gnu_pbds::detail::cc_ht_map< Key, Mapped, Hash_Fn, Eq_Fn, _Alloc, Store_Hash, Comb_Hash_Fn, Resize_Policy > β€” a collision-chaining hash-based container. It’s from the libstdc++ manual, section 3cxx, and it is highkey giving template-class main character energy πŸ’…βœ¨


✨ SYNOPSIS ✨

#include <cc_ht_map_.hpp>

Inherits:

Inherits __gnu_pbds::detail::hash_eq_fn< Key, Eq_Fn, _Alloc, Store_Hash
>, Resize_Policy, __gnu_pbds::detail::ranged_hash_fn< Key, Hash_Fn,
_Alloc, Comb_Hash_Fn, Store_Hash >, and
__gnu_pbds::detail::types_traits< Key, Mapped, _Alloc, Store_Hash >.

the way that inheritance list ate, no cap 🫢

🌸 Public Types 🌸

  • enum { store_hash } β€” value stores hash, true or false. πŸ’–
  • typedef _Alloc allocator_type
  • typedef Comb_Hash_Fn comb_hash_fn
  • typedef const_iterator_ const_iterator
  • typedef traits_base::const_pointer const_pointer
  • typedef traits_base::const_reference const_reference
  • typedef _Alloc::difference_type difference_type
  • typedef Eq_Fn eq_fn
  • typedef Hash_Fn hash_fn
  • typedef iterator_ iterator
  • typedef traits_base::key_const_pointer key_const_pointer
  • typedef traits_base::key_const_reference key_const_reference
  • typedef traits_base::key_pointer key_pointer
  • typedef traits_base::key_reference key_reference
  • typedef traits_base::key_type key_type
  • typedef traits_base::mapped_const_pointer mapped_const_pointer
  • typedef traits_base::mapped_const_reference mapped_const_reference
  • typedef traits_base::mapped_pointer mapped_pointer
  • typedef traits_base::mapped_reference mapped_reference
  • typedef traits_base::mapped_type mapped_type
  • typedef __nothrowcopy::indicator no_throw_indicator
  • typedef point_const_iterator_ point_const_iterator
  • typedef point_iterator_ point_iterator
  • typedef traits_base::pointer pointer
  • typedef traits_base::reference reference
  • typedef Resize_Policy resize_policy
  • typedef _Alloc::size_type size_type
  • typedef integral_constant< int, Store_Hash > store_extra
  • typedef stored_data< value_type, size_type, Store_Hash > stored_data_type
  • typedef traits_base::value_type value_type

πŸ’… Public Member Functions πŸ’…

  • cc_ht_map (const cc_ht_map< Key, Mapped, Hash_Fn, Eq_Fn, _Alloc, Store_Hash, Comb_Hash_Fn, Resize_Policy > &)
  • cc_ht_map (const Hash_Fn &)
  • cc_ht_map (const Hash_Fn &, const Eq_Fn &)
  • cc_ht_map (const Hash_Fn &, const Eq_Fn &, const Comb_Hash_Fn &)
  • cc_ht_map (const Hash_Fn &, const Eq_Fn &, const Comb_Hash_Fn &, const Resize_Policy &)
  • iterator begin ()
  • const_iterator begin () const
  • void clear ()
  • template<typename It > void copy_from_range (It, It)
  • bool empty () const β€” true if size() == 0. πŸŽ€
  • iterator end ()
  • const_iterator end () const
  • bool erase (key_const_reference)
  • template<typename Pred > size_type erase_if (Pred)
  • point_iterator find (key_const_reference)
  • point_const_iterator find (key_const_reference) const
  • point_iterator find_end ()
  • point_const_iterator find_end () const
  • Comb_Hash_Fn & get_comb_hash_fn () β€” return current comb_hash_fn. πŸ’–
  • const Comb_Hash_Fn & get_comb_hash_fn () const β€” return current const comb_hash_fn. πŸ’–
  • Eq_Fn & get_eq_fn () β€” return current eq_fn. πŸ’–
  • const Eq_Fn & get_eq_fn () const β€” return current const eq_fn. πŸ’–
  • Hash_Fn & get_hash_fn () β€” return current hash_fn. πŸ’–
  • const Hash_Fn & get_hash_fn () const β€” return current const hash_fn. πŸ’–
  • Resize_Policy & get_resize_policy () β€” return current resize_policy. πŸ’–
  • const Resize_Policy & get_resize_policy () const β€” return current const resize_policy. πŸ’–
  • void initialize ()
  • std::pair< point_iterator, bool > insert (const_reference r_val)
  • size_type max_size () const
  • mapped_reference operator[] (key_const_reference r_key)
  • size_type size () const
  • void swap (cc_ht_map< Key, Mapped, Hash_Fn, Eq_Fn, _Alloc, Store_Hash, Comb_Hash_Fn, Resize_Policy > &)

πŸŽ€ Public Attributes πŸŽ€

  • no_throw_indicator m_no_throw_copies_indicator
  • store_extra m_store_extra_indicator

πŸ¦‹ Friends πŸ¦‹

  • class const_iterator_
  • class iterator_

πŸ‘‘ Detailed Description πŸ‘‘

template<typename Key, typename Mapped, typename Hash_Fn, typename Eq_Fn,
    typename _Alloc, bool Store_Hash, typename Comb_Hash_Fn, typename
    Resize_Policy>
class __gnu_pbds::detail::cc_ht_map< Key, Mapped, Hash_Fn, Eq_Fn,
_Alloc, Store_Hash, Comb_Hash_Fn, Resize_Policy >

it is literally β€œA collision-chaining hash-based container.” and that’s the whole vibe, bestie 😭πŸ”₯

🌈 Template Parameters 🌈

  • Key β€” key type.
  • Mapped β€” map type.
  • Hash_Fn β€” hashing functor. Default is __gnu_cxx::hash.
  • Eq_Fn β€” equal functor. Default std::equal_to<Key>
  • _Alloc β€” allocator type.
  • Store_Hash β€” if key type stores extra metadata. Defaults to false.
  • Comb_Hash_Fn β€” combining hash functor. If Hash_Fn is not null_type, then this is the ranged-hash functor; otherwise, this is the range-hashing functor. XXX(See Design::Hash-Based Containers::Hash Policies.) Default direct_mask_range_hashing.
  • Resize_Policy β€” resizes hash. Defaults to hash_standard_resize_policy, using hash_exponential_size_policy and hash_load_check_resize_trigger.

Bases are: detail::hash_eq_fn, Resize_Policy, detail::ranged_hash_fn, detail::types_traits. (Optional: detail::debug_map_base.)


πŸ“ Member Enumeration Documentation πŸ“

template<typename Key , typename Mapped , typename Hash_Fn , typename Eq_Fn
    , typename _Alloc , bool Store_Hash, typename Comb_Hash_Fn , typename
    Resize_Policy > anonymous enum

Value stores hash, true or false. πŸ’–


🧚 Member Function Documentation 🧚

empty () const

template<typename Key , typename Mapped , typename Hash_Fn , typename Eq_Fn
    , typename _Alloc , bool Store_Hash, typename Comb_Hash_Fn , typename
    Resize_Policy > bool __gnu_pbds::detail::cc_ht_map< Key, Mapped,
    Hash_Fn, Eq_Fn, _Alloc, Store_Hash, Comb_Hash_Fn, Resize_Policy >::empty
    () const [inline]

True if size() == 0. ✨

get_comb_hash_fn ()

template<typename Key , typename Mapped , typename Hash_Fn , typename Eq_Fn
    , typename _Alloc , bool Store_Hash, typename Comb_Hash_Fn , typename
    Resize_Policy > Comb_Hash_Fn & __gnu_pbds::detail::cc_ht_map< Key,
    Mapped, Hash_Fn, Eq_Fn, _Alloc, Store_Hash, Comb_Hash_Fn, Resize_Policy
    >::get_comb_hash_fn ()

Return current comb_hash_fn. πŸ’…

get_comb_hash_fn () const

template<typename Key , typename Mapped , typename Hash_Fn , typename Eq_Fn
    , typename _Alloc , bool Store_Hash, typename Comb_Hash_Fn , typename
    Resize_Policy > const Comb_Hash_Fn & __gnu_pbds::detail::cc_ht_map< Key,
    Mapped, Hash_Fn, Eq_Fn, _Alloc, Store_Hash, Comb_Hash_Fn, Resize_Policy
    >::get_comb_hash_fn () const

Return current const comb_hash_fn. πŸ’…

get_eq_fn ()

template<typename Key , typename Mapped , typename Hash_Fn , typename Eq_Fn
    , typename _Alloc , bool Store_Hash, typename Comb_Hash_Fn , typename
    Resize_Policy > Eq_Fn & __gnu_pbds::detail::cc_ht_map< Key, Mapped,
    Hash_Fn, Eq_Fn, _Alloc, Store_Hash, Comb_Hash_Fn, Resize_Policy
    >::get_eq_fn ()

Return current eq_fn. 🫢

get_eq_fn () const

template<typename Key , typename Mapped , typename Hash_Fn , typename Eq_Fn
    , typename _Alloc , bool Store_Hash, typename Comb_Hash_Fn , typename
    Resize_Policy > const Eq_Fn & __gnu_pbds::detail::cc_ht_map< Key,
    Mapped, Hash_Fn, Eq_Fn, _Alloc, Store_Hash, Comb_Hash_Fn, Resize_Policy
    >::get_eq_fn () const

Return current const eq_fn. 🫢

get_hash_fn ()

template<typename Key , typename Mapped , typename Hash_Fn , typename Eq_Fn
    , typename _Alloc , bool Store_Hash, typename Comb_Hash_Fn , typename
    Resize_Policy > Hash_Fn & __gnu_pbds::detail::cc_ht_map< Key, Mapped,
    Hash_Fn, Eq_Fn, _Alloc, Store_Hash, Comb_Hash_Fn, Resize_Policy
    >::get_hash_fn ()

Return current hash_fn. πŸ”₯

get_hash_fn () const

template<typename Key , typename Mapped , typename Hash_Fn , typename Eq_Fn
    , typename _Alloc , bool Store_Hash, typename Comb_Hash_Fn , typename
    Resize_Policy > const Hash_Fn & __gnu_pbds::detail::cc_ht_map< Key,
    Mapped, Hash_Fn, Eq_Fn, _Alloc, Store_Hash, Comb_Hash_Fn, Resize_Policy
    >::get_hash_fn () const

Return current const hash_fn. πŸ”₯

get_resize_policy ()

template<typename Key , typename Mapped , typename Hash_Fn , typename Eq_Fn
    , typename _Alloc , bool Store_Hash, typename Comb_Hash_Fn , typename
    Resize_Policy > Resize_Policy & __gnu_pbds::detail::cc_ht_map< Key,
    Mapped, Hash_Fn, Eq_Fn, _Alloc, Store_Hash, Comb_Hash_Fn, Resize_Policy
    >::get_resize_policy ()

Return current resize_policy. 🌸

get_resize_policy () const

template<typename Key , typename Mapped , typename Hash_Fn , typename Eq_Fn
    , typename _Alloc , bool Store_Hash, typename Comb_Hash_Fn , typename
    Resize_Policy > const Resize_Policy & __gnu_pbds::detail::cc_ht_map<
    Key, Mapped, Hash_Fn, Eq_Fn, _Alloc, Store_Hash, Comb_Hash_Fn,
    Resize_Policy >::get_resize_policy () const

Return current const resize_policy. 🌸


✨ Author ✨

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

xoxo bestie, source/version vibe is libstdc++ and manual section 3cxx β€” generated automatically by Doxygen from the source code. The footer doesn’t hand us a date, but the energy is timeless πŸ’–πŸŽ€