Top level include containg common headers.
struct tree_node * rchild
Pointer to node right child.
t_gen key
Pointer to node key.
struct tree_node * lchild
Pointer to node left child.
f_gen min
routine to get minm element in tree
f_find find
routine to find element in tree
f_len height
routine to get height of tree
f_gen2 pred
routine to get predecessor to given node
f_ins insert
routine to insert element in tree
f_len node_count
routine to get total nodes in tree
f_print print
routine to print tree level by level
e_treetype type
Tree Type.
char * name
Tree instance name.
f_print inorder
routine to print inorder traversal of tree
f_gen max
routine to get maxm element in tree
f_destroy destroy
routine to destroy the tree instance
f_print preorder
routine to print preorder traversal of tree
t_gen root
Root node of the tree.
f_gen2 succ
routine to get successor to given node
f_del del
routine to delete element in tree
int count
Tree node count.
f_print postorder
routine to print postorder traversal of tree
t_gen create_tree(char *name, e_treetype, t_dparams *prm)
tree interface API
struct tree_node t_tree_node
tree node
e_treetype
Types of trees.
@ eBST
Binary Search Tree.
struct tree t_tree
tree struct defn
f_gen2 f_find
fn type of find a elem function
void(* f_free)(t_gen, char *, int)
f_vgen f_print
fn type to print function
f_vgen f_destroy
fn type of destroy function
e_cmpr(* f_cmpr)(t_gen, t_gen)
Basic operations required for generic data type support.
t_gen(* f_gen2)(t_gen, t_gen)
fn ptr that takes two gen ptr and return gen ptr
int(* f_len)(t_gen)
fn type of get len function
void * t_gen
Base Data type used for all data structure and data elements.
f_vgen2 f_ins
fn type of insert elem function
t_gen(* f_gen)(t_gen)
Generic data pointer definitions that are common to most data structure operations.
f_gen2 f_del
fn type of delete elem function