counter_update_policy
 Interface
A list-update policy that moves elements to the front of the list based on the counter algorithm.
This class is likely to slightly change interface when random number generators become part of the C++ standard.
../../../../include/ext/pb_assoc/counter_update_policy.hppcounter_update_policy.hpp #link1Template parameters.
Public Types and Constants:
#link2Size definitions.
Public Methods:
#link3Constructors, destructor, and related.
#link4Information methods.
Protected Types and Constants:
#link5Metadata definitions.
Protected Methods:
#link6Metadata operations.
Template parameters.
Parameter Description Default Value Size_Type Size type.
size_t
Metadata_Reference Metadata reference type.
std::allocator<
  
counter_update_metadata.htmlcounter_update_metadata >::
    reference
Size definitions.
Type Definition Description size_type #Size_Type3735929483Size_Type Size type used for counting the number of times each node is accessed until the count is reset to 0 and the node moved to the front of the list.
Constructors, destructor, and related.
Method Description   counter_update_policy
  (
#size_type3735929547size_type  max_count = 5) Constructor. max_count determines the the number of times each node is accessed until the count is reset to 0 and the node moved to the front of the list.
void  swap
  (
counter_update_policy &r_other) Swaps content.
Information methods.
Method Description inline  
#size_type3735929547size_type   get_max_count
  () 
const Returns the max count of each metadata (number of times it is accessed until moved to the front of the list).
Metadata definitions.
Type Definition Description metadata_type counter_update_metadata.htmlcounter_update_metadata Metadata on which this functor operates.
metadata_reference #Metadata_Reference3735929465Metadata_Reference Reference to metadata on which this functor operates.
Metadata operations.
Method Description #metadata_type3735929937metadata_type   
operator()
  () 
const Creates a metadata object.
bool  
operator()
  (
#metadata_reference3735929497metadata_reference  r_data) const Decides whether a metadata object should be moved to the front of the list.
