Trait outils::tree::bst::OrderedTree [] [src]

pub trait OrderedTree<Ix = DefaultIndexType> where
    Ix: IndexType
{ fn sub_predecessor(&self, node: NodeIndex<Ix>) -> Option<NodeIndex<Ix>>;
fn sub_successor(&self, node: NodeIndex<Ix>) -> Option<NodeIndex<Ix>>;
fn predecessor(&self, node: NodeIndex<Ix>) -> Option<NodeIndex<Ix>>;
fn successor(&self, node: NodeIndex<Ix>) -> Option<NodeIndex<Ix>>;
fn first(&self, node: NodeIndex<Ix>) -> Option<NodeIndex<Ix>>;
fn last(&self, node: NodeIndex<Ix>) -> Option<NodeIndex<Ix>>;
fn is_smaller(&self, node_u: NodeIndex<Ix>, node_v: NodeIndex<Ix>) -> bool; }

This trait defines operations for navigating the binary tree with respect to its in-order.

Required Methods

Returns the biggest node of the left subtree of the tree node indexed by node.

Returns the smallest node of the right subtree of the tree node indexed by node.

Returns the biggest node of the whole tree which is smaller than the tree node indexed by node.

Returns the smallest node of the whole tree which is bigger than the tree node indexed by node.

Returns the smallest node of the left subtree of the tree node indexed by node.

Returns the biggest node of the right subtree of the tree node indexed by node.

Returns true if the tree node indexed by node_u is smaller than the tree node indexed by node_v. Otherwise, and in particular if one of the specified indices is invalid, false is returned.

Implementors