data_structures
rbt_utils.h
Go to the documentation of this file.
1 /* ************************************************************************** */
3 /* */
4 /* ::: :::::::: */
5 /* rbt_utils.h :+: :+: :+: */
6 /* +:+ +:+ +:+ */
7 /* By: unite <marvin@42.fr> +#+ +:+ +#+ */
8 /* +#+#+#+#+#+ +#+ */
9 /* Created: 2020/07/18 16:53:08 by unite #+# #+# */
10 /* Updated: 2020/07/21 21:31:21 by unite ### ########.fr */
11 /* */
12 /* ************************************************************************** */
13 
14 #ifndef RBT_MAP_UTILS_H
15 
16 # define RBT_MAP_UTILS_H
17 
18 # include "rbt.h"
19 
20 t_rbt_node *rbt_make_node(const t_rbt *rbt, const void *key,
21  const void *val, t_rbt_node_color color);
22 t_rbt_node *rbt_rotate_left(t_rbt *rbt, t_rbt_node *h);
23 t_rbt_node *rbt_rotate_right(t_rbt *rbt, t_rbt_node *h);
24 void rbt_flip_color(t_rbt *rbt, t_rbt_node *h);
25 int rbt_is_red_node(const t_rbt_node *node);
26 size_t rbt_size_subtree(const t_rbt_node *node);
27 
28 #endif
s_rbt
A left-leaning red-black binary search tree.
Definition: rbt.h:72
rbt.h
s_rbt_node
A node in a red-black tree.
Definition: rbt.h:51