Graphviz 12.0.1~dev.20240716.0800
Loading...
Searching...
No Matches
red_black_tree.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  rb_red_blk_node
 
struct  rb_red_blk_tree
 

Typedefs

typedef struct rb_red_blk_node rb_red_blk_node
 
typedef struct rb_red_blk_tree rb_red_blk_tree
 

Functions

rb_red_blk_treeRBTreeCreate (int(*CompFunc)(const void *, const void *), void(*DestFunc)(void *))
 
rb_red_blk_nodeRBTreeInsert (rb_red_blk_tree *, void *key)
 
void RBDelete (rb_red_blk_tree *, rb_red_blk_node *)
 
void RBTreeDestroy (rb_red_blk_tree *)
 
rb_red_blk_nodeTreePredecessor (rb_red_blk_tree *, rb_red_blk_node *)
 
rb_red_blk_nodeTreeSuccessor (rb_red_blk_tree *, rb_red_blk_node *)
 
rb_red_blk_nodeRBExactQuery (rb_red_blk_tree *, void *)
 

Typedef Documentation

◆ rb_red_blk_node

◆ rb_red_blk_tree

Function Documentation

◆ RBDelete()

void RBDelete ( rb_red_blk_tree tree,
rb_red_blk_node z 
)

Definition at line 524 of file red_black_tree.c.

References free(), rb_red_blk_node::key, rb_red_blk_node::left, rb_red_blk_node::parent, RBDeleteFixUp(), rb_red_blk_node::red, rb_red_blk_node::right, tree, TreeSuccessor(), and z.

Referenced by main().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ RBExactQuery()

rb_red_blk_node * RBExactQuery ( rb_red_blk_tree tree,
void *  q 
)

Definition at line 412 of file red_black_tree.c.

References rb_red_blk_node::key, rb_red_blk_node::left, rb_red_blk_node::right, and tree.

Referenced by main().

Here is the caller graph for this function:

◆ RBTreeCreate()

rb_red_blk_tree * RBTreeCreate ( int(*)(const void *, const void *)  CompFunc,
void(*)(void *)  DestFunc 
)

Definition at line 27 of file red_black_tree.c.

References rb_red_blk_tree::Compare, rb_red_blk_tree::DestroyKey, free(), rb_red_blk_node::key, rb_red_blk_node::left, malloc(), rb_red_blk_tree::nil, NULL, rb_red_blk_node::parent, rb_red_blk_node::red, rb_red_blk_node::right, and rb_red_blk_tree::root.

Referenced by main().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ RBTreeDestroy()

void RBTreeDestroy ( rb_red_blk_tree tree)

Definition at line 391 of file red_black_tree.c.

References free(), tree, and TreeDestHelper().

Referenced by main().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ RBTreeInsert()

rb_red_blk_node * RBTreeInsert ( rb_red_blk_tree tree,
void *  key 
)

Definition at line 229 of file red_black_tree.c.

References key, rb_red_blk_node::key, rb_red_blk_node::left, LeftRotate(), malloc(), newNode(), NULL, rb_red_blk_node::parent, rb_red_blk_node::red, rb_red_blk_node::right, RightRotate(), tree, and TreeInsertHelp().

Referenced by main().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TreePredecessor()

rb_red_blk_node * TreePredecessor ( rb_red_blk_tree tree,
rb_red_blk_node x 
)

Definition at line 331 of file red_black_tree.c.

References rb_red_blk_node::left, rb_red_blk_node::parent, rb_red_blk_node::right, and tree.

Referenced by main().

Here is the caller graph for this function:

◆ TreeSuccessor()

rb_red_blk_node * TreeSuccessor ( rb_red_blk_tree tree,
rb_red_blk_node x 
)

Definition at line 296 of file red_black_tree.c.

References rb_red_blk_node::left, rb_red_blk_node::parent, rb_red_blk_node::right, and tree.

Referenced by main(), and RBDelete().

Here is the caller graph for this function: