1 write to Parent
System.Speech (1)
Internal\RBList.cs (1)
195newNode?.Parent = null;
79 references to Parent
System.Speech (79)
Internal\RBList.cs (79)
141System.Diagnostics.Debug.Assert(node.Parent?.Parent != null, "Tree is not in the right state to have an uncle"); 142if (node.Parent == node.Parent.Parent.Left) 144return node.Parent.Parent.Right; 148return node.Parent.Parent.Left; 193if (node.Parent == null) 197else if (node.Parent.Left == node) 199node.Parent.Left = newNode; 201else if (node.Parent.Right == node) 203node.Parent.Right = newNode; 243while (node.Parent != null && node.Parent.Left != node) 245node = node.Parent; 248return node.Parent; 331while (node.Parent != null) 333node = node.Parent; 347if (node.Parent == null) 358if (IsBlack(node.Parent)) 365Debug.Assert(IsBlack(node.Parent.Parent)); 370SetColor(node.Parent, NodeColor.BLACK); 372SetColor(node.Parent.Parent, NodeColor.RED); 373FixInsertCase1(node.Parent.Parent!); // Move recursively up 384Debug.Assert(IsRed(node.Parent)); 388if (node == node.Parent.Right && node.Parent == node.Parent.Parent!.Left) 390RotateLeft(node.Parent); 393else if (node == node.Parent.Left && node.Parent == node.Parent.Parent!.Right) 395RotateRight(node.Parent); 407SetColor(node.Parent, NodeColor.BLACK); 408SetColor(node.Parent!.Parent, NodeColor.RED); 409if (node == node.Parent.Left) 411Debug.Assert(node.Parent == node.Parent.Parent!.Left); // From case 3 412RotateRight(node.Parent.Parent); 416Debug.Assert(node.Parent == node.Parent.Parent!.Right); // From case 3 417RotateLeft(node.Parent.Parent); 429Debug.Assert(node.Parent == null || node.Parent.Left == onlyChild || node.Parent.Right == onlyChild); 430Debug.Assert(onlyChild == null || onlyChild.Parent == node.Parent); 443else if (node.Parent == null) // if we remove a root node, nothing has changed. 454FixRemovalCase2(GetSibling(onlyChild, node.Parent)!); 462if (node.Parent == null) 468FixRemovalCase2(GetSibling(node, node.Parent)); 478TreeNode parent = sibling.Parent!; 485RotateLeft(sibling.Parent!); 491RotateRight(sibling.Parent!); 503if (IsBlack(sibling.Parent) && 509FixRemovalCase1(sibling.Parent!); 519if (IsRed(sibling.Parent) && 525SetColor(sibling.Parent, NodeColor.BLACK); 535if (sibling == sibling.Parent!.Right && 543sibling = sibling.Parent; 545else if (sibling == sibling.Parent.Left && 553sibling = sibling.Parent; 562SetColor(sibling, GetColor(sibling.Parent)); 563SetColor(sibling.Parent, NodeColor.BLACK); 564if (sibling == sibling.Parent!.Right) 568RotateLeft(sibling.Parent); 574RotateRight(sibling.Parent);