trees :: BinTreeMap :: insert_node
node
in the tree.
# Add `node` in the tree.
protected fun insert_node(node: N) do
len += 1
if root == null then
root = node
else
shift_down(root.as(not null), node)
end
if first_node == null then
first_node = node
end
if last_node != null then
last_node.next = node
node.prev = last_node
end
last_node = node
end
lib/trees/bintree.nit:156,2--172,4
redef fun insert_node(node) do
super
insert_fixup_case1(node)
end
lib/trees/rbtree.nit:55,2--58,4