Next: , Previous: rbtree_node_size, Up: Public Routines


3.1.19 rbtree_next_node

Determine the next in-order node to a given node.

Synopsis

     #include <rbtree/rbtree.h>
     
     
     
RBNode rbtree_next_node( RBTree rbtree, RBNode rbnode, SiblingOrder sib_order );

Parameters

RBTree rbtree
the tree to traverse
RBNode rbnode
the node to find the neighbor of
SiblingOrder sib_order
the direction of traversal
          
          
Possible values for a SiblingOrder are as follows: LEFT_TO_RIGHT, RIGHT_TO_LEFT

Description

Determine the next in-order node (depending upon the user's desired traversal direction).

Returns

It returns a handle to the next node or NULL if there is none.