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::hash_standard_resize_policy.3cxx

Author

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

                                                    libstd__gnu_pbds::hash_stand...ize_Access,Size_Type>(3cxx)

Constructor & Destructor Documentation

template<typenameSize_Policy=hash_exponential_size_policy<>,typenameTrigger_Policy=hash_load_check_resize_trigger<>,boolExternal_Size_Access=false,typenameSize_Type=std::size_t>__gnu_pbds::hash_standard_resize_policy<Size_Policy,Trigger_Policy,External_Size_Access,Size_Type>::hash_standard_resize_policy()
       Default constructor.

   template<typenameSize_Policy=hash_exponential_size_policy<>,typenameTrigger_Policy=hash_load_check_resize_trigger<>,boolExternal_Size_Access=false,typenameSize_Type=std::size_t>__gnu_pbds::hash_standard_resize_policy<Size_Policy,Trigger_Policy,External_Size_Access,Size_Type>::hash_standard_resize_policy(constSize_Policy&r_size_policy)
       constructor taking some policies r_size_policy will be copied by the Size_Policy object of this object.

   template<typenameSize_Policy=hash_exponential_size_policy<>,typenameTrigger_Policy=hash_load_check_resize_trigger<>,boolExternal_Size_Access=false,typenameSize_Type=std::size_t>__gnu_pbds::hash_standard_resize_policy<Size_Policy,Trigger_Policy,External_Size_Access,Size_Type>::hash_standard_resize_policy(constSize_Policy&r_size_policy,constTrigger_Policy&r_trigger_policy)
       constructor taking some policies. r_size_policy will be copied by the Size_Policy object of this  object.
       r_trigger_policy will be copied by the Trigger_Policy object of this object.

Detailed Description

template<typenameSize_Policy=hash_exponential_size_policy<>,typenameTrigger_Policy=hash_load_check_resize_trigger<>,boolExternal_Size_Access=false,typenameSize_Type=std::size_t>
       class __gnu_pbds::hash_standard_resize_policy< Size_Policy, Trigger_Policy, External_Size_Access,
       Size_Type >"A resize policy which delegates operations to size and trigger policies.

Member Enumeration Documentation

template<boolExternal_Load_Access=false,typenameSize_Type=std::size_t>anonymousenum[inherited]Enumeratorexternal_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<typenameSize_Policy=hash_exponential_size_policy<>,typenameTrigger_Policy=hash_load_check_resize_trigger<>,boolExternal_Size_Access=false,typenameSize_Type=std::size_t>size_type__gnu_pbds::hash_standard_resize_policy<Size_Policy,Trigger_Policy,External_Size_Access,Size_Type>::get_actual_size()const[inline]
       Returns the actual size of the container.

   template<boolExternal_Load_Access=false,typenameSize_Type=std::size_t>std::pair<float,float>__gnu_pbds::hash_load_check_resize_trigger<External_Load_Access,Size_Type>::get_loads()const[inline],[inherited]
       Returns a pair of the minimal and maximal loads, respectively.

   template<typenameSize_Policy=hash_exponential_size_policy<>,typenameTrigger_Policy=hash_load_check_resize_trigger<>,boolExternal_Size_Access=false,typenameSize_Type=std::size_t>size_type__gnu_pbds::hash_standard_resize_policy<Size_Policy,Trigger_Policy,External_Size_Access,Size_Type>::get_new_size(size_typesize,size_typenum_used_e)const[protected]
       Queries  what  the new size should be, when the container is resized naturally. The current __size of the
       container is size, and the number of used entries within the container is num_used_e.

   template<typenameSize_Policy=hash_exponential_size_policy<>,typenameTrigger_Policy=hash_load_check_resize_trigger<>,boolExternal_Size_Access=false,typenameSize_Type=std::size_t>Size_Policy&__gnu_pbds::hash_standard_resize_policy<Size_Policy,Trigger_Policy,External_Size_Access,Size_Type>::get_size_policy()
       Access to the Size_Policy object used.

   template<typenameSize_Policy=hash_exponential_size_policy<>,typenameTrigger_Policy=hash_load_check_resize_trigger<>,boolExternal_Size_Access=false,typenameSize_Type=std::size_t>constSize_Policy&__gnu_pbds::hash_standard_resize_policy<Size_Policy,Trigger_Policy,External_Size_Access,Size_Type>::get_size_policy()const
       Const access to the Size_Policy object used.

   template<typenameSize_Policy=hash_exponential_size_policy<>,typenameTrigger_Policy=hash_load_check_resize_trigger<>,boolExternal_Size_Access=false,typenameSize_Type=std::size_t>Trigger_Policy&__gnu_pbds::hash_standard_resize_policy<Size_Policy,Trigger_Policy,External_Size_Access,Size_Type>::get_trigger_policy()
       Access to the Trigger_Policy object used.

   template<typenameSize_Policy=hash_exponential_size_policy<>,typenameTrigger_Policy=hash_load_check_resize_trigger<>,boolExternal_Size_Access=false,typenameSize_Type=std::size_t>constTrigger_Policy&__gnu_pbds::hash_standard_resize_policy<Size_Policy,Trigger_Policy,External_Size_Access,Size_Type>::get_trigger_policy()const
       Access to the Trigger_Policy object used.

   template<typenameSize_Policy=hash_exponential_size_policy<>,typenameTrigger_Policy=hash_load_check_resize_trigger<>,boolExternal_Size_Access=false,typenameSize_Type=std::size_t>void__gnu_pbds::hash_standard_resize_policy<Size_Policy,Trigger_Policy,External_Size_Access,Size_Type>::resize(size_typesuggested_new_size)
       Resizes the container to suggested_new_size, a suggested size (the actual size will be determined by  the
       Size_Policy object).

   template<boolExternal_Load_Access=false,typenameSize_Type=std::size_t>void__gnu_pbds::hash_load_check_resize_trigger<External_Load_Access,Size_Type>::set_loads(std::pair<float,float>load_pair)[inherited]
       Sets the loads through a pair of the minimal and maximal loads, respectively.

Name

       __gnu_pbds::hash_standard_resize_policy< Size_Policy, Trigger_Policy, External_Size_Access, Size_Type > -
       A resize policy which delegates operations to size and trigger policies.

Synopsis

       #include <hash_policy.hpp>

       Inherits __gnu_pbds::hash_exponential_size_policy<Size_Type>, and
       __gnu_pbds::hash_load_check_resize_trigger<External_Load_Access,Size_Type>.

   PublicTypes
       enum { external_load_access }
       enum { external_size_access }
       typedef Size_Policy size_policy
       typedef Size_Type size_type
       typedef Trigger_Policy trigger_policyPublicMemberFunctionshash_standard_resize_policy ()
           Default constructor.
       hash_standard_resize_policy (const Size_Policy &r_size_policy)
           constructor taking some policies r_size_policy will be copied by the Size_Policy object of this
           object.
       hash_standard_resize_policy (const Size_Policy &r_size_policy, const Trigger_Policy &r_trigger_policy)
           constructor taking some policies. r_size_policy will be copied by the Size_Policy object of this
           object. r_trigger_policy will be copied by the Trigger_Policy object of this object.
       size_type get_actual_size () const
           Returns the actual size of the container.
       std::pair< float, float > get_loads () const
           Returns a pair of the minimal and maximal loads, respectively.
       Size_Policy & get_size_policy ()
           Access to the Size_Policy object used.
       const Size_Policy & get_size_policy () const
           Const access to the Size_Policy object used.
       Trigger_Policy & get_trigger_policy ()
           Access to the Trigger_Policy object used.
       const Trigger_Policy & get_trigger_policy () const
           Access to the Trigger_Policy object used.
       void resize (size_type suggested_new_size)
           Resizes the container to suggested_new_size, a suggested size (the actual size will be determined by
           the Size_Policy object).
       void set_loads (std::pair< float, float > load_pair)
           Sets the loads through a pair of the minimal and maximal loads, respectively.
       void swap (hash_exponential_size_policy< Size_Type > &other)
       void swap (hash_load_check_resize_trigger &other)
       void swap (hash_standard_resize_policy< Size_Policy, Trigger_Policy, External_Size_Access, Size_Type >
           &other)

   ProtectedMemberFunctions
       size_type get_nearest_larger_size (size_type size) const
       size_type get_nearest_smaller_size (size_type size) const
       size_type get_new_size (size_type size, size_type num_used_e) const
           Queries what the new size should be, when the container is resized naturally. The current __size of
           the container is size, and the number of used entries within the container is num_used_e.
       bool is_grow_needed (size_type size, size_type num_entries) const
       bool is_resize_needed () const
       void notify_cleared ()
       void notify_erase_search_collision ()
       void notify_erase_search_end ()
       void notify_erase_search_start ()
       void notify_erased (size_type num_e)
       void notify_externally_resized (size_type new_size)
       void notify_find_search_collision ()
       void notify_find_search_end ()
       void notify_find_search_start ()
       void notify_insert_search_collision ()
       void notify_insert_search_end ()
       void notify_insert_search_start ()
       void notify_inserted (size_type num_e)
       void notify_resized (size_type new_size)

See Also