Изменения

Перейти к: навигация, поиск

B+-дерево

1218 байт добавлено, 22:21, 31 марта 2018
Нет описания правки
tec.pointers[0] = left_sibling.pointers[left_sibling.key_num]
tec.child[0] = left_sibling.child [left_sibling.key_num + 1]
update(tec) <span style="color:#008000"> // Обновить ключи в родителяхна пути к корню</span>
'''else if''' right_sibling <tex>\neq</tex> null '''and''' right_sibling.key_num <tex>\small{\geqslant}</tex> t - 1
tec.pointers[tec.key_num - 1] = right_sibling.child[0]
tec.child[tec.key_num - 1] = right_sibling.pointers[0]
update(tec) '''else''' '''if''' left_sibling <tex>\neq</tex> null left_sibling.right = tec.right tec.right.left = left_sibling '''for''' i = 0 to tec.key_num - 1 left_sibling.key[left_sibling.key_num] = tec.key[i] left_sibling.pointers[left_sibling.key_num] = tec.pointers[i] left_sibling.child[left_sibling.key_num + 1] = tec.child[i] ++left_sibling.key_num left_sibling.child[left_sibling.key_num + 1] = tec.child[tec.key_num] update(left_sibling) '''else'return true'' right_sibling.right.left = tec tec.right = right_sibling.right '''for''' i = 0 to tec.key_num - 1 tec.key[tec.key_num] = right_sibling.key[i] tec.pointers[tec.key_num] = right_sibling.pointers[i] tec.child[tec.key_num + 1] = right_sibling.child[i] ++tec.key_num tec.child[tec.key_num + 1] = right_sibling.child[right_sibling.key_num] update(tec)
== Примeчания ==
<references/>
286
правок

Навигация