class documentation
class FavoritesListMTF(FavoritesList):
List of elements ordered with move-to-front heuristic.
Method | top |
Generate sequence of top k elements in terms of access count. |
Method | _move |
Move accessed item at Position p to front of list. |
Inherited from FavoritesList
:
Method | __init__ |
Create an empty list of favorites. |
Method | __len__ |
Return number of entries on favorites list. |
Method | __repr__ |
Create string representation of the favorites list. |
Method | access |
Access element e, thereby increasing its access count. |
Method | is |
Return True if list is empty. |
Method | remove |
Remove element e from the list of favorites. |
Class | _ |
Undocumented |
Method | _find |
Search for element e and return its Position (or None if not found). |
Instance Variable | _data |
Undocumented |