logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

__gnu_pbds::cc_hash_max_collision_check_resize_trigger.3cxx

Author

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

                                                    libstd__gnu_pbds::cc_hash_ma...oad_Access,Size_Type>(3cxx)

Constructor & Destructor Documentation

template<boolExternal_Load_Access=false,typenameSize_Type=std::size_t>__gnu_pbds::cc_hash_max_collision_check_resize_trigger<External_Load_Access,Size_Type>::cc_hash_max_collision_check_resize_trigger(floatload=0.5)
       Default constructor, or constructor taking load, a __load factor which it will attempt to maintain.

Detailed Description

template<boolExternal_Load_Access=false,typenameSize_Type=std::size_t>
       class __gnu_pbds::cc_hash_max_collision_check_resize_trigger< External_Load_Access, Size_Type >"A resize
       trigger policy based on collision checks. It keeps the simulated load factor lower than some given load
       factor.

Member Enumeration Documentation

template<boolExternal_Load_Access=false,typenameSize_Type=std::size_t>anonymousenumEnumeratorexternal_load_access
              Specifies  whether  the  load  factor  can  be accessed externally. The two options have different
              trade-offs in terms of flexibility, genericity, and encapsulation.

Member Function Documentation

template<boolExternal_Load_Access=false,typenameSize_Type=std::size_t>float__gnu_pbds::cc_hash_max_collision_check_resize_trigger<External_Load_Access,Size_Type>::get_load()const[inline]
       Returns the current load.

   template<boolExternal_Load_Access=false,typenameSize_Type=std::size_t>bool__gnu_pbds::cc_hash_max_collision_check_resize_trigger<External_Load_Access,Size_Type>::is_grow_needed(size_typesize,size_typenum_entries)const[inline],[protected]
       Queries whether a grow is needed. This method is called only if this object indicated is needed.

   template<boolExternal_Load_Access=false,typenameSize_Type=std::size_t>bool__gnu_pbds::cc_hash_max_collision_check_resize_trigger<External_Load_Access,Size_Type>::is_resize_needed()const[inline],[protected]
       Queries whether a resize is needed.

   template<boolExternal_Load_Access=false,typenameSize_Type=std::size_t>void__gnu_pbds::cc_hash_max_collision_check_resize_trigger<External_Load_Access,Size_Type>::notify_cleared()[protected]
       Notifies the table was cleared.

   template<boolExternal_Load_Access=false,typenameSize_Type=std::size_t>void__gnu_pbds::cc_hash_max_collision_check_resize_trigger<External_Load_Access,Size_Type>::notify_erase_search_collision()[inline],[protected]
       Notifies a search encountered a collision.

   template<boolExternal_Load_Access=false,typenameSize_Type=std::size_t>void__gnu_pbds::cc_hash_max_collision_check_resize_trigger<External_Load_Access,Size_Type>::notify_erase_search_end()[inline],[protected]
       Notifies a search ended.

   template<boolExternal_Load_Access=false,typenameSize_Type=std::size_t>void__gnu_pbds::cc_hash_max_collision_check_resize_trigger<External_Load_Access,Size_Type>::notify_erase_search_start()[inline],[protected]
       Notifies an erase search started.

   template<boolExternal_Load_Access=false,typenameSize_Type=std::size_t>void__gnu_pbds::cc_hash_max_collision_check_resize_trigger<External_Load_Access,Size_Type>::notify_erased(size_typenum_entries)[inline],[protected]
       Notifies an element was erased.

   template<boolExternal_Load_Access=false,typenameSize_Type=std::size_t>void__gnu_pbds::cc_hash_max_collision_check_resize_trigger<External_Load_Access,Size_Type>::notify_externally_resized(size_typenew_size)[protected]
       Notifies the table was resized externally.

   template<boolExternal_Load_Access=false,typenameSize_Type=std::size_t>void__gnu_pbds::cc_hash_max_collision_check_resize_trigger<External_Load_Access,Size_Type>::notify_find_search_collision()[inline],[protected]
       Notifies a search encountered a collision.

   template<boolExternal_Load_Access=false,typenameSize_Type=std::size_t>void__gnu_pbds::cc_hash_max_collision_check_resize_trigger<External_Load_Access,Size_Type>::notify_find_search_end()[inline],[protected]
       Notifies a search ended.

   template<boolExternal_Load_Access=false,typenameSize_Type=std::size_t>void__gnu_pbds::cc_hash_max_collision_check_resize_trigger<External_Load_Access,Size_Type>::notify_find_search_start()[inline],[protected]
       Notifies a find search started.

   template<boolExternal_Load_Access=false,typenameSize_Type=std::size_t>void__gnu_pbds::cc_hash_max_collision_check_resize_trigger<External_Load_Access,Size_Type>::notify_insert_search_collision()[inline],[protected]
       Notifies a search encountered a collision.

   template<boolExternal_Load_Access=false,typenameSize_Type=std::size_t>void__gnu_pbds::cc_hash_max_collision_check_resize_trigger<External_Load_Access,Size_Type>::notify_insert_search_end()[inline],[protected]
       Notifies a search ended.

   template<boolExternal_Load_Access=false,typenameSize_Type=std::size_t>void__gnu_pbds::cc_hash_max_collision_check_resize_trigger<External_Load_Access,Size_Type>::notify_insert_search_start()[inline],[protected]
       Notifies an insert search started.

   template<boolExternal_Load_Access=false,typenameSize_Type=std::size_t>void__gnu_pbds::cc_hash_max_collision_check_resize_trigger<External_Load_Access,Size_Type>::notify_inserted(size_typenum_entries)[inline],[protected]
       Notifies an element was inserted.

   template<boolExternal_Load_Access=false,typenameSize_Type=std::size_t>void__gnu_pbds::cc_hash_max_collision_check_resize_trigger<External_Load_Access,Size_Type>::notify_resized(size_typenew_size)[protected]
       Notifies the table was resized as a result of this object's signifying that a resize is needed.

   template<boolExternal_Load_Access=false,typenameSize_Type=std::size_t>void__gnu_pbds::cc_hash_max_collision_check_resize_trigger<External_Load_Access,Size_Type>::set_load(floatload)
       Sets the load; does not resize the container.

Name

       __gnu_pbds::cc_hash_max_collision_check_resize_trigger< External_Load_Access, Size_Type > - A resize
       trigger policy based on collision checks. It keeps the simulated load factor lower than some given load
       factor.

Synopsis

       #include <hash_policy.hpp>

   PublicTypes
       enum { external_load_access }
       typedef Size_Type size_typePublicMemberFunctionscc_hash_max_collision_check_resize_trigger (float load=0.5)
           Default constructor, or constructor taking load, a __load factor which it will attempt to maintain.
       float get_load () const
           Returns the current load.
       void set_load (float load)
           Sets the load; does not resize the container.
       void swap (cc_hash_max_collision_check_resize_trigger< External_Load_Access, Size_Type > &other)

   ProtectedMemberFunctions
       bool is_grow_needed (size_type size, size_type num_entries) const
           Queries whether a grow is needed. This method is called only if this object indicated is needed.
       bool is_resize_needed () const
           Queries whether a resize is needed.
       void notify_cleared ()
           Notifies the table was cleared.
       void notify_erase_search_collision ()
           Notifies a search encountered a collision.
       void notify_erase_search_end ()
           Notifies a search ended.
       void notify_erase_search_start ()
           Notifies an erase search started.
       void notify_erased (size_type num_entries)
           Notifies an element was erased.
       void notify_externally_resized (size_type new_size)
           Notifies the table was resized externally.
       void notify_find_search_collision ()
           Notifies a search encountered a collision.
       void notify_find_search_end ()
           Notifies a search ended.
       void notify_find_search_start ()
           Notifies a find search started.
       void notify_insert_search_collision ()
           Notifies a search encountered a collision.
       void notify_insert_search_end ()
           Notifies a search ended.
       void notify_insert_search_start ()
           Notifies an insert search started.
       void notify_inserted (size_type num_entries)
           Notifies an element was inserted.
       void notify_resized (size_type new_size)
           Notifies the table was resized as a result of this object's signifying that a resize is needed.

See Also