A sample list-update policy. More...
#include <sample_update_policy.hpp>
Public Member Functions | |
sample_update_policy () | |
Default constructor. More... | |
sample_update_policy (const sample_update_policy &) | |
Copy constructor. More... | |
void | swap (sample_update_policy &other) |
Swaps content. More... | |
Protected Types | |
typedef some_metadata_type | metadata_type |
Metadata on which this functor operates. More... | |
Protected Member Functions | |
metadata_type | operator() () const |
Creates a metadata object. More... | |
bool | operator() (metadata_reference) const |
Decides whether a metadata object should be moved to the front of the list. More... | |
A sample list-update policy.
|
protected |
Metadata on which this functor operates.
__gnu_pbds::sample_update_policy::sample_update_policy | ( | ) |
Default constructor.
__gnu_pbds::sample_update_policy::sample_update_policy | ( | const sample_update_policy & | ) |
Copy constructor.
|
protected |
Creates a metadata object.
|
protected |
Decides whether a metadata object should be moved to the front of the list.
A list-update based containers object will call this method to decide whether to move a node to the front of the list. The method shoule return true if the node should be moved to the front of the list.
|
inline |
Swaps content.