Esempio n. 1
0
/* Rebalances the subtree in BT rooted at SUBTREE, which contains
   exactly COUNT nodes. */
static void rebalance_subtree (TreeMap *bt, struct Node *subtree, size_t count)
{
  struct Node *up = subtree->up;
  struct Node **q = down_link (bt, subtree);
  tree_to_vine (q);
  vine_to_tree (q, count);
  (*q)->up = up;
}
Esempio n. 2
0
void balance_DSW(btree *t)
{
	tree_to_vine(t);
	vine_to_tree_DSW(t);
}
Esempio n. 3
0
void balance_Day(btree *t)
{
	tree_to_vine(t);
	vine_to_tree_Day(t);
}