__gnu_pbds::lu_counter_policy.3cxx
Contents
Detailed Description
template<std::size_tMax_Count=5,typename_Alloc=std::allocator<char>>
class __gnu_pbds::lu_counter_policy< Max_Count, _Alloc >"A list-update policy that moves elements to the
front of the list based on the counter algorithm.
Member Enumeration Documentation
template<std::size_tMax_Count=5,typename_Alloc=std::allocator<char>>anonymousenumEnumeratormax_count
When some element is accessed this number of times, it will be moved to the front of the list.
Member Function Documentation
template<std::size_tMax_Count=5,typename_Alloc=std::allocator<char>>metadata_type__gnu_pbds::lu_counter_policy<Max_Count,_Alloc>::operator()()const[inline]
Creates a metadata object.
References __gnu_pbds::lu_counter_policy<Max_Count,_Alloc>::max_count.
template<std::size_tMax_Count=5,typename_Alloc=std::allocator<char>>bool__gnu_pbds::lu_counter_policy<Max_Count,_Alloc>::operator()(metadata_referencer_data)const[inline]
Decides whether a metadata object should be moved to the front of the list.
References __gnu_pbds::lu_counter_policy<Max_Count,_Alloc>::max_count.
Member Typedef Documentation
template<std::size_tMax_Count=5,typename_Alloc=std::allocator<char>>typedefdetail::rebind_traits<_Alloc,metadata_type>::reference__gnu_pbds::lu_counter_policy<Max_Count,_Alloc>::metadata_reference
Reference to metadata on which this functor operates.
template<std::size_tMax_Count=5,typename_Alloc=std::allocator<char>>typedefdetail::lu_counter_metadata<size_type>__gnu_pbds::lu_counter_policy<Max_Count,_Alloc>::metadata_type
Metadata on which this functor operates.
Name
__gnu_pbds::lu_counter_policy< Max_Count, _Alloc >
Synopsis
#include <list_update_policy.hpp>
Inherits __gnu_pbds::detail::lu_counter_policy_base<_Alloc::size_type>.
PublicTypes
enum { max_count }
typedef _Alloc allocator_type
typedef detail::rebind_traits< _Alloc, metadata_type >::reference metadata_reference
Reference to metadata on which this functor operates.
typedef detail::lu_counter_metadata< size_type > metadata_type
Metadata on which this functor operates.
typedef allocator_type::size_type size_typePublicMemberFunctionsmetadata_typeoperator() () const
Creates a metadata object.
bool operator() (metadata_reference r_data) const
Decides whether a metadata object should be moved to the front of the list.
PrivateMemberFunctions
bool operator() (Metadata_Reference r_data, size_type m_max_count) const
lu_counter_metadata< size_type > operator() (size_type max_size) const
