RED
Ship.cond = RED;
Ship.cond = RED;
Ship.cond = RED;
while (node != rbtree->root && node->parent->color == RED) {
if (uncle->color == RED) {
node->parent->parent->color = RED;
node->parent->parent->color = RED;
if (uncle->color == RED) {
node->parent->parent->color = RED;
node->parent->parent->color = RED;
data->color = RED;
if(to_delete->color == RED)
else if(child->color == RED)
if(sibling->color == RED)
child_parent->color = RED;
sibling->color = RED;
if(child_parent->color == RED
sibling->color = RED;
&& sibling->right->color == RED
sibling->color = RED;
&& sibling->left->color == RED
sibling->color = RED;
log_assert(sibling->left->color == RED);
log_assert(sibling->right->color == RED);
while (node != rbtree->root && node->parent->color == RED) {
if (uncle->color == RED) {
node->parent->parent->color = RED;
node->parent->parent->color = RED;
if (uncle->color == RED) {
node->parent->parent->color = RED;
node->parent->parent->color = RED;
data->color = RED;
if(to_delete->color == RED)
else if(child->color == RED)
if(sibling->color == RED)
child_parent->color = RED;
sibling->color = RED;
if(child_parent->color == RED
sibling->color = RED;
&& sibling->right->color == RED
sibling->color = RED;
&& sibling->left->color == RED
sibling->color = RED;
assert(sibling->left->color == RED);
assert(sibling->right->color == RED);
while (node != rbtree->root && node->parent->color == RED) {
if (uncle->color == RED) {
node->parent->parent->color = RED;
node->parent->parent->color = RED;
if (uncle->color == RED) {
node->parent->parent->color = RED;
node->parent->parent->color = RED;
data->color = RED;
if(to_delete->color == RED)
else if(child->color == RED)
if(sibling->color == RED)
child_parent->color = RED;
sibling->color = RED;
if(child_parent->color == RED
sibling->color = RED;
&& sibling->right->color == RED
sibling->color = RED;
&& sibling->left->color == RED
sibling->color = RED;
log_assert(sibling->left->color == RED);
log_assert(sibling->right->color == RED);