C Everything
This is a C repository containing a curated set of generic data structures and algorithm.
tree Struct Reference

tree struct defn More...

#include <tree.h>

Data Fields

char * name
 Tree instance name. More...
 
e_treetype type
 Tree Type. More...
 
int count
 Tree node count. More...
 
t_gen root
 Root node of the tree. More...
 
f_ins insert
 routine to insert element in tree More...
 
f_del del
 routine to delete element in tree More...
 
f_find find
 routine to find element in tree More...
 
f_gen2 pred
 routine to get predecessor to given node More...
 
f_gen2 succ
 routine to get successor to given node More...
 
f_gen min
 routine to get minm element in tree More...
 
f_gen max
 routine to get maxm element in tree More...
 
f_len height
 routine to get height of tree More...
 
f_len node_count
 routine to get total nodes in tree More...
 
f_print inorder
 routine to print inorder traversal of tree More...
 
f_print preorder
 routine to print preorder traversal of tree More...
 
f_print postorder
 routine to print postorder traversal of tree More...
 
f_print print
 routine to print tree level by level More...
 
f_destroy destroy
 routine to destroy the tree instance More...
 
f_cmpr cmpr
 
f_swap swap
 
f_free free
 
f_print print_data
 

Detailed Description

tree struct defn

Definition at line 24 of file tree.h.

Field Documentation

◆ cmpr

f_cmpr cmpr

Definition at line 50 of file tree.h.

◆ count

int count

Tree node count.

Definition at line 28 of file tree.h.

◆ del

f_del del

routine to delete element in tree

Definition at line 35 of file tree.h.

◆ destroy

f_destroy destroy

routine to destroy the tree instance

Definition at line 47 of file tree.h.

◆ find

f_find find

routine to find element in tree

Definition at line 36 of file tree.h.

◆ free

f_free free

Definition at line 52 of file tree.h.

◆ height

f_len height

routine to get height of tree

Definition at line 41 of file tree.h.

◆ inorder

f_print inorder

routine to print inorder traversal of tree

Definition at line 43 of file tree.h.

◆ insert

f_ins insert

routine to insert element in tree

Definition at line 34 of file tree.h.

◆ max

f_gen max

routine to get maxm element in tree

Definition at line 40 of file tree.h.

◆ min

f_gen min

routine to get minm element in tree

Definition at line 39 of file tree.h.

◆ name

char* name

Tree instance name.

Definition at line 26 of file tree.h.

◆ node_count

f_len node_count

routine to get total nodes in tree

Definition at line 42 of file tree.h.

◆ postorder

f_print postorder

routine to print postorder traversal of tree

Definition at line 45 of file tree.h.

◆ pred

f_gen2 pred

routine to get predecessor to given node

Definition at line 37 of file tree.h.

◆ preorder

f_print preorder

routine to print preorder traversal of tree

Definition at line 44 of file tree.h.

◆ print

f_print print

routine to print tree level by level

Definition at line 46 of file tree.h.

◆ print_data

f_print print_data

Definition at line 53 of file tree.h.

◆ root

t_gen root

Root node of the tree.

Definition at line 31 of file tree.h.

◆ succ

f_gen2 succ

routine to get successor to given node

Definition at line 38 of file tree.h.

◆ swap

f_swap swap

Definition at line 51 of file tree.h.

◆ type

e_treetype type

Tree Type.

See also
types of trees

Definition at line 27 of file tree.h.


The documentation for this struct was generated from the following file: