60e7c3e7ba
* NEW: Heap is a new class that implements a Min- or MaxHeap, depending upon a mode parameter to its constructor. It supports some advanced ways to manipulate the contained data -- beyond the first entry. git-svn-id: svn://localhost/gambas/trunk@6402 867c0c6c-44f3-4631-809d-bfa615b0a4ec
39 lines
1.8 KiB
Text
39 lines
1.8 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.
|
|
|
|
Trie:
|
|
* BUG: Maintain lexicographical order in Trie.
|
|
|
|
Graph:
|
|
* Write down the hidden methods and their signatures
|
|
* Set down the relationships between methods; which default implementation
|
|
calls what; what is minimum needed to implement a fully-functional Graph
|