Next: , Previous: rbtree_bnd_search_node, Up: Public Routines


3.1.3 rbtree_count

Determine the number of nodes in a red-black tree.

Synopsis

     #include <rbtree/rbtree.h>
     
     
     
unsigned long rbtree_count(RBTree rbtree);

Parameters

RBTree rbtree
the tree in question

Description

This routine returns the number of nodes in an rbtree. As each tree keeps a counter of how many nodes is in it, this is an inexpensive function to call.