Commit 868d4a3968abab077a284e1e255e50f086a06d2c

Authored by Matthieu Herrmann
1 parent 6665a1d2

maj 2-4tree.anubis

Showing 1 changed file with 9 additions and 5 deletions   Show diff stats
anubis_dev/library/tools/2-4tree.anubis
1 1 Author : Matthieu Herrmann
2 2 Creation : 2014/04/14
3   - Last update : 2014/04/15 16:54 by matthieu@embryo (inserted by vim).
  3 + Last update : 2014/04/16 14:28 by matthieu@embryo (inserted by vim).
4 4 ======================================================================================================================
5 5 Library import:
6 6 read tools/iterators.anubis
... ... @@ -103,8 +103,9 @@ public define Iterator(($Key, $Value)) take_right(TreeKV($Key, $Value) tkv).
103 103 *** [3] Removing
104 104 *** [3.1] Leaf functions
105 105 *** [3.2] Internal node functions
106   - *** [3.3] Main removing function
107   - *** [3.4] Removal public interface on trees
  106 + *** [3.3] Rightmost leaf from the left node.
  107 + *** [3.4] Main removing function
  108 + *** [3.5] Removal public interface on trees
108 109 *** [4] Get/has functions
109 110 *** [4.1] Internal function for node
110 111 *** [4.2] Get/has public interface on trees
... ... @@ -436,6 +437,9 @@ define Node($Entry) node_fuse_in_right($Entry lkey, Node($Entry) lsubnode, Node(
436 437 node4(_, _, _, _, _, _, _) then should_not_happen(rnode)
437 438 }.
438 439  
  440 + *** [3.3] Rightmost leaf from the left node.
  441 + ================================================================================================================
  442 +
439 443 define $Entry search_left_rightmost(Node($Entry) node) = if node is
440 444 {
441 445 leaf1(l1) then l1
... ... @@ -447,7 +451,7 @@ define $Entry search_left_rightmost(Node($Entry) node) = if node is
447 451 node4(_, _, _, _, _, _, n4) then search_left_rightmost(n4)
448 452 }.
449 453  
450   - *** [3.3] Main removing function
  454 + *** [3.4] Main removing function
451 455 ================================================================================================================
452 456  
453 457 Removing function. BIG ONE: a lot of different case to handle here
... ... @@ -866,7 +870,7 @@ define RemoveResult($Entry) remove(
866 870  
867 871 }.
868 872  
869   - *** [3.4] Removal public interface on trees
  873 + *** [3.5] Removal public interface on trees
870 874 ================================================================================================================
871 875  
872 876 public define Tree($Entry) remove($Entry entry, Tree($Entry) tr) = if tr is
... ...