| www.delorie.com/gnu/docs/avl/libavl_287.html | search |
![]() Buy GNU books! | |
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
1. There is no general efficient algorithm to find the parent of a node in an RTAVL tree. The lack of left threads means that half the time we must do a full search from the top of the tree. This would increase the execution time for deletion unacceptably.
if (p->rtavl_rtag == RTAVL_THREAD) |
struct rtavl_node *t = p->rtavl_link[0]; while (t->rtavl_rtag == RTAVL_CHILD) t = t->rtavl_link[1]; t->rtavl_link[1] = p->rtavl_link[1]; pa[k - 1]->rtavl_link[da[k - 1]] = p->rtavl_link[0]; |
pa[k - 1]->rtavl_link[da[k - 1]] = p->rtavl_link[da[k - 1]]; if (da[k - 1] == 1) pa[k - 1]->rtavl_rtag = RTAVL_THREAD; |
r->rtavl_link[0] = p->rtavl_link[0]; if (r->rtavl_link[0] != NULL) |
struct rtavl_node *s; int j = k++; for (;;) |
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
| webmaster donations bookstore | delorie software privacy |
| Copyright © 2003 by The Free Software Foundation | Updated Jun 2003 |