| | <@xref{\NODE\, , PBST compression function.>,682}
static void vine_to_tree (struct pbst_table *tree) {
unsigned long vine; /* Number of nodes in main vine. */
unsigned long leaves; /* Nodes in incomplete bottom level, if any. */
int height; /* Height of produced balanced tree. */
struct pbst_node *p, *q; /* Current visited node and its parent. */
<@xref{\NODE\, , Calculate leaves.>; bst => pbst,91}
<@xref{\NODE\, , Reduce vine general case to special case; bst =>.> pbst,92}
<@xref{\NODE\, , Make special case vine into balanced tree and count height; bst =>.> pbst,93}
<@xref{\NODE\, , Set parents of main vine.>,681}
}
|