void insert_case1(struct rbtree* t, struct rbtree_node* n) { if (n->parent == NULL) n->color = BLACK; else insert_case2(t, n); }
static inline void rbtree_add_node_impl(struct RBTREE_TYPENAME* target, struct RBTREE_NODE* N) { DEBUG_RBTREE("rbtree_add_node_impl: "RBTREE_KEY_PRNF"\n", RBTREE_KEY_PRN(N->key)); DEBUG_RBTREE("before:\n"); // RBTREE_PRINT(target); N->color = RED; if (target->size == 0) { target->root = N; target->size = 1; insert_case1(target, N); } else { // Normal tree insertion struct RBTREE_NODE* root = target->root; rbtree_add_loop(target, N, root); insert_case2(target, N); } DEBUG_RBTREE("after:\n"); // RBTREE_PRINT(target); }
void Bintree:: insert_case1(leaf* n) { if (n->parent == nullptr) n->color = col::black; else insert_case2(n); }
static inline void insert_case1(struct RBTREE_TYPENAME* target, struct RBTREE_NODE* node) { if (node->parent == NULL) node->color = BLACK; else insert_case2(target, node); }
/* * === FUNCTION ====================================================================== * Name: insert_case1 * Description: Covers if this is inserting the root * ===================================================================================== */ static void insert_case1 ( set * n ) { if(n->parent == NULL) { n->color = BLACK; } else { insert_case2(n); } } /* ----- end of function insert_case1 ----- */
static void insert_case1(L_RBTREE *t, node *n) { if (n->parent == NULL) n->color = L_BLACK_NODE; else insert_case2(t, n); }
void insert_case1(rbtree t, node n) { if (n->parent == NULL) n->color = BLACK; else insert_case2(t, n); }
void insert_case1(GtkWidget *darea, rbtree t, node n) { if (n->parent == NULL) n->color = BLACK; else insert_case2(darea, t, n); }
void insert_case1(rb_node* n, rb_tree* tree) { if (n->parent == NULL) n->color = BLACK; else insert_case2(n, tree); }