AVL tree

Class Genode::Avl_node_base

Public definitions

Enum

LEFT RIGHT false true

Public functions

Avl_node_base

Constructor

insert

Insert new node into subtree

Arguments
Avl_node_base * node
Policy & policy

remove

Remove node from tree

Argument
Policy & policy

Template class Genode::Avl_node

AVL node

Template argument
typename NT Type of the class derived from avl_node
Inherits from

public Avl_node_base

Each object to be stored in the avl tree must be derived from Avl_node. The type of the derived class is to be specified as template argument to enable Avl_node to call virtual functions specific for the derived class.

Public functions

child

Argument
Side i
Return

NT *

recompute

Default policy

Template class Genode::Avl_tree

Root node of the AVL tree

Template argument
typename NT
Inherits from

Avl_node<NT>

The real nodes are always attached at the left branch of this root node.

Public functions

first

Request first node of the tree

Return

NT * First node

NULL

if tree is empty

insert

Insert node into AVL tree

Argument
Avl_node<NT> * node

remove

Remove node from AVL tree

Argument
Avl_node<NT> * node