33 lines
1.5 KiB
Text
33 lines
1.5 KiB
Text
|
NOTE that one should not compare elements in a list based on their indices.
|
||
|
If List2 is an exact copy of List1 and both Currents point to the same
|
||
|
element, it is not guaranteed that List1.Index = List2.Index because one of
|
||
|
them could be the negative equivalent of the other (non-negative) one.
|
||
|
|
||
|
* OPT: Dynamically add up to 8 anchors to increase the chance of finding a
|
||
|
very good anchor for traversals. These are automatically updated on
|
||
|
append/prepend/take operations to be widespread across the List.
|
||
|
* OPT: Also save an anchor of the last element obtained via _get().
|
||
|
Sequential traversal with indices should now be almost array-like in
|
||
|
speed.
|
||
|
|
||
|
* BUG: Current can be used as an enumerator now without corrupting the list
|
||
|
and also if it is initially invalid.
|
||
|
|
||
|
* OPT: Make the VAL_append()/prepend() algorithms more clever: They can use
|
||
|
any neighbour chunk now to borrow space for the inserted value. This
|
||
|
measure reduces list fragmentation and also enables to satisfy the (L)
|
||
|
postulate.
|
||
|
|
||
|
* NEW: Push() and Pop() are new methods of the List class to save and
|
||
|
restore anchors from a Gambas program. These can be used to quickly go
|
||
|
back to a formerly-visited element.
|
||
|
|
||
|
AvlTree:
|
||
|
|
||
|
* NEW: Add a Copy() method to return a deep copy of an AvlTree.
|
||
|
* NEW: Split() is a new method of AvlTree to return the left or right
|
||
|
subtree of a given node or both.
|
||
|
* NEW: Add Insert() to insert an AvlTree into another one.
|
||
|
* NEW: Add PreOrder, PostOrder, Reverse and LevelOrder virtual properties to
|
||
|
specify the enumeration flavour.
|