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_exponential_size_policy.3cxx

Author

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

                                                    libstd__gnu_pbds::hash_expon...ize_policy<Size_Type>(3cxx)

Constructor & Destructor Documentation

template<typenameSize_Type=std::size_t>__gnu_pbds::hash_exponential_size_policy<Size_Type>::hash_exponential_size_policy(size_typestart_size=8,size_typegrow_factor=2)
       Default constructor, or onstructor taking a start_size, or constructor taking a start size and
       grow_factor. The policy will use the sequence of sizes start_size, start_size* grow_factor, start_size*
       grow_factor^2, ...

Detailed Description

template<typenameSize_Type=std::size_t>
       class __gnu_pbds::hash_exponential_size_policy< Size_Type >"A size policy whose sequence of sizes form an
       exponential sequence (typically powers of 2.

Name

       __gnu_pbds::hash_exponential_size_policy< Size_Type > - A size policy whose sequence of sizes form an
       exponential sequence (typically powers of 2.

Synopsis

       #include <hash_policy.hpp>

       Inherited by __gnu_pbds::hash_standard_resize_policy<Size_Policy,Trigger_Policy,External_Size_Access,Size_Type>.

   PublicTypes
       typedef Size_Type size_typePublicMemberFunctionshash_exponential_size_policy (size_type start_size=8, size_type grow_factor=2)
           Default constructor, or onstructor taking a start_size, or constructor taking a start size and
           grow_factor. The policy will use the sequence of sizes start_size, start_size* grow_factor,
           start_size* grow_factor^2, ...
       void swap (hash_exponential_size_policy< Size_Type > &other)

   ProtectedMemberFunctions
       size_type get_nearest_larger_size (size_type size) const
       size_type get_nearest_smaller_size (size_type size) const

See Also