class_docstr: A self-organising list with the move-to-front heuristic.
  
  A self-organising list is a collection which we want to retrieve items
  that satisfy some predicate from. There is no faster way to do this than
  a linear scan (as the predicates may be arbitrary), but the performance
  of a linear scan can vary dramatically - if we happen to find a good item
  on the first try it's O(1) after all. The idea of a self-organising list is
  to reorder the list to try to get lucky this way as often as possible.
  
  There are various heuristics we could use for this, and it's not clear
  which are best. We use the simplest, which is that every time we find
  an item we move it to the "front" (actually the back in our implementation
  because we iterate in reverse) of the list.
class_docstr_tok: ["A","self-organising","list","with","the","move-to-front","heuristic",".","A","self-organising","list","is","a","collection","which","we","want","to","retrieve","items","that","satisfy","some","predicate","from",".","There","is","no","faster","way","to","do","this","than","a","linear","scan","(","as","the","predicates","may","be","arbitrary",")",",","but","the","performance","of","a","linear","scan","can","vary","dramatically","-","if","we","happen","to","find","a","good","item","on","the","first","try","it","'s","O","(","1",")","after","all",".","The","idea","of","a","self-organising","list","is","to","reorder","the","list","to","try","to","get","lucky","this","way","as","often","as","possible",".","There","are","various","heuristics","we","could","use","for","this",",","and","it","'s","not","clear","which","are","best",".","We","use","the","simplest",",","which","is","that","every","time","we","find","an","item","we","move","it","to","the","``","front","''","(","actually","the","back","in","our","implementation","because","we","iterate","in","reverse",")","of","the","list","."]
docstr: Add a value to this list.
docstr_tok: ["Add","a","value","to","this","list","."]
code: def add(self, value: T) -> None:
      """Add a value to this list."""
      self.__values.append(value)
  
imports: import array
  import sys
  import warnings
  from random import Random
  from typing import Callable, Dict, Generic, Iterable, Iterator, List, Optional, Sequence, Tuple, TypeVar, Union, overload
  from hypothesis.errors import HypothesisWarning
label_desc: Use image node_id 3 for calling the SelfOrganisingList obj's underlying member method code with example usage: obj.add(value) without return types