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

Contains declations of tree types, operations and structure. More...

#include "common.h"

Go to the source code of this file.

Data Structures

struct  tree_node
 tree node More...
 
struct  tree
 tree struct defn More...
 

Typedefs

typedef struct tree_node t_tree_node
 tree node More...
 
typedef struct tree t_tree
 tree struct defn More...
 

Enumerations

enum  e_treetype { eBST , eAVL }
 Types of trees. More...
 

Functions

t_gen create_tree (char *name, e_treetype, t_dparams *prm)
 tree interface API More...
 

Detailed Description

Contains declations of tree types, operations and structure.

Definition in file tree.h.

Typedef Documentation

◆ t_tree

typedef struct tree t_tree

tree struct defn

◆ t_tree_node

typedef struct tree_node t_tree_node

tree node

Enumeration Type Documentation

◆ e_treetype

enum e_treetype

Types of trees.

Enumerator
eBST 

Binary Search Tree.

eAVL 

AVL Tree.

Definition at line 17 of file tree.h.

Function Documentation

◆ create_tree()

t_gen create_tree ( char *  name,
e_treetype  ttype,
t_dparams prm 
)

tree interface API

tree interface API

Parameters
name- Name of tree instance
ttype- Type of tree to be created
prm- Data type specific parameters
Returns
- Pointer to instance of tree

Definition at line 45 of file tree.c.