tuple of int or None
|
substract(range1,
range2)
Compute the difference between two ranges (range1 [0], range1 [1])
and (range2 [0], range2 [1]) (range1 - range2). |
source code
|
|
tuple of int
|
cache(total,
cached,
index)
Given a total number of elements and a
number of cached elements amongst them,
compute which elements are currently cached. |
source code
|
|
tuple of tuple of int
|
update_index(total,
cached,
old_index,
new_index)
Given a total number of elements and a
number of cached elements amongst them,
compute which currently cached elements have to be removed and which
ones have to be added for a change of index. |
source code
|
|
int
|
insert(total,
cached,
index,
inserted)
Given a total number of elements and a
number of cached elements amongst them,
compute the index of the cached element that has to be removed for an
insertion at index inserted . |
source code
|
|
int
|
remove(total,
cached,
index,
removed)
Given a total number of elements and a
number of cached elements amongst them,
compute the index of the cached element that has to be added for a
removal at index removed . |
source code
|
|