System\Data\RbTree.cs (48)
131_pageTable[0]!._slots[0]._nodeColor = NodeColor.black;
377Debug.Assert(page._slots[slotId]._nodeColor == NodeColor.red, "node not cleared");
648SetColor(z_id, NodeColor.black);
741SetColor(x_id, NodeColor.red);
745while (color(Parent(x_id)) == NodeColor.red)
750if (color(y_id) == NodeColor.red) // my right uncle is red
752SetColor(Parent(x_id), NodeColor.black); // x.parent.color = Color.black;
753SetColor(y_id, NodeColor.black);
754SetColor(Parent(Parent(x_id)), NodeColor.red); // x.parent.parent.color = Color.red;
765SetColor(Parent(x_id), NodeColor.black); // x.parent.color = Color.black;
766SetColor(Parent(Parent(x_id)), NodeColor.red); // x.parent.parent.color = Color.red;
773if (color(y_id) == NodeColor.red) // if (y.color == Color.red) // my right uncle is red
775SetColor(Parent(x_id), NodeColor.black);
776SetColor(y_id, NodeColor.black);
777SetColor(Parent(Parent(x_id)), NodeColor.red); // x.parent.parent.color = Color.red;
788SetColor(Parent(x_id), NodeColor.black); // x.parent.color = Color.black;
789SetColor(Parent(Parent(x_id)), NodeColor.red); // x.parent.parent.color = Color.red;
796SetColor(root, NodeColor.black);
798SetColor(root_id, NodeColor.black);
969if (color(y_id) == NodeColor.black)
1104while (((root_id == NIL ? root : root_id) != x_id) && color(x_id) == NodeColor.black)
1119if (color(w_id) == NodeColor.red)
1121SetColor(w_id, NodeColor.black);
1122SetColor(px_id, NodeColor.red);
1127if (color(Left(w_id)) == NodeColor.black && color(Right(w_id)) == NodeColor.black)
1129SetColor(w_id, NodeColor.red);
1135if (color(Right(w_id)) == NodeColor.black)
1137SetColor(Left(w_id), NodeColor.black);
1138SetColor(w_id, NodeColor.red);
1144SetColor(px_id, NodeColor.black);
1145SetColor(Right(w_id), NodeColor.black);
1155if (color(w_id) == NodeColor.red)
1157SetColor(w_id, NodeColor.black);
1160SetColor(px_id, NodeColor.red);
1168SetColor(px_id, NodeColor.red);
1179if (color(Right(w_id)) == NodeColor.black && color(Left(w_id)) == NodeColor.black)
1181SetColor(w_id, NodeColor.red);
1187if (color(Left(w_id)) == NodeColor.black)
1189SetColor(Right(w_id), NodeColor.black);
1190SetColor(w_id, NodeColor.red);
1196SetColor(px_id, NodeColor.black);
1197SetColor(Left(w_id), NodeColor.black);
1206SetColor(x_id, NodeColor.black);
1707private void SetColor(int nodeId, NodeColor color)
1822private NodeColor color(int nodeId)
1881internal NodeColor _nodeColor;