class documentation
class FavoritesList:
Known subclasses: dsap.linkedlist.favorites_list_mtf.FavoritesListMTF
List of elements ordered from most frequently accessed to least.
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. |
Method | top |
Generate sequence of top k elements in terms of access count. |
Class | _ |
Undocumented |
Method | _find |
Search for element e and return its Position (or None if not found). |
Method | _move |
Move item at Position p earlier in the list based on access count. |
Instance Variable | _data |
Undocumented |
overridden in
dsap.linkedlist.favorites_list_mtf.FavoritesListMTF
Generate sequence of top k elements in terms of access count.
overridden in
dsap.linkedlist.favorites_list_mtf.FavoritesListMTF
Move item at Position p earlier in the list based on access count.