-
Notifications
You must be signed in to change notification settings - Fork 1
/
os_tree.h
29 lines (25 loc) · 1.43 KB
/
os_tree.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#ifndef OS_TREE_H_INCLUDED
#define OS_TREE_H_INCLUDED
/*********************************/
/* HEADER FILE FOR os_tree.c */
/*********************************/
#include "io_utils.h"
/* function declarations */
void OS_INORDER_TREE_WALK (os_tree_header* Tree, os_tree_node *node_x, FILE *fp);
os_tree_node *OS_ITERATIVE_TREE_SEARCH (os_tree_header *Tree, os_tree_node *node_x, float key_k);
os_tree_node *OS_TREE_MINIMUM (os_tree_header* Tree, os_tree_node *node_x);
os_tree_node *OS_TREE_MAXIMUM (os_tree_header* Tree, os_tree_node *node_x);
os_tree_node *OS_TREE_SUCCESSOR(os_tree_header* Tree, os_tree_node *node_x);
os_tree_node *OS_TREE_PREDECESSOR (os_tree_header* Tree, os_tree_node *node_x);
void OS_LEFT_ROTATE (os_tree_header *Tree, os_tree_node *node_x);
void OS_RIGHT_ROTATE (os_tree_header *Tree, os_tree_node *node_x);
void OS_INSERT_FIXUP (os_tree_header *Tree, os_tree_node *node_z);
os_tree_node *OS_INSERT (os_tree_header *Tree, customer* data_record);
void OS_DELETE_FIXUP (os_tree_header *Tree, os_tree_node *node_x);
os_tree_node *OS_DELETE(os_tree_header *Tree, os_tree_node *node_z);
os_tree_node *OS_SELECT(os_tree_node *node_x, unsigned int i);
unsigned int OS_RANK(os_tree_header *Tree, os_tree_node *node_x);
void print_node_data (os_tree_node *node_x);
void print_customer_data(os_tree_node *node_x, FILE *fp);
void OS_ENUMERATE(os_tree_header *Tree, os_tree_node *x, float low, float high, FILE *fp);
#endif // OS_TREE_H_INCLUDED