pika-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pika-dev] fsplay_delete is b0rked


From: Matthew Dempsky
Subject: [Pika-dev] fsplay_delete is b0rked
Date: 06 May 2004 23:20:00 -0500
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

      /* delete
       * 
       * Have:
       * 
       *        T
       *     /     \
       *   _Tl     _Tr
       *
       * and want to remove T.
       * 
       * Removing T is the same as inserting _Tr after _Tl.
       */

Yes and no... it would be if insert_after preserved the children of
the node to be inserted, but it doesn't.  As it is, delete drops all
of Tr's children.

The two possible solutions to this are either to rewrite insert_after
(and insert_before for consistancy) to protect children from being
lost or add a new operation fsplay_join.  I'm leaning towards the
latter and plan on writing it unless someone thinks the
insert_(before|after) modification would be better.

-jivera




reply via email to

[Prev in Thread] Current Thread [Next in Thread]