13 writes to Right
System.Collections (13)
System\Collections\Generic\SortedSet.cs (13)
360parent.Right = node; 679successor.Right = match.Right; 956root.Right = new Node(arr[endIndex], NodeColor.Black); 966root.Right = new Node(arr[endIndex], NodeColor.Black); 976root.Right = size % 2 == 0 ? 1652next.target.Right = clonedNode; 1735Right = child.Left; 1749grandChild.Right = this; 1750child.Right = grandChild.Left; 1762child.Right = this; 1774Right = grandChild.Left; 1777grandChild.Right = child; 1813Right = newChild;
56 references to Right
System.Collections (56)
System\Collections\Generic\SortedSet.cs (49)
211Node? node = current.Right; 253if (current.Right != null) 255processQueue.Enqueue(current.Right); 352current = (order < 0) ? current.Left : current.Right; 425if (parent.Right == sibling) 486current = order < 0 ? current.Left : current.Right; 612bool parentIsOnRight = grandParent.Right == parent; 613bool currentIsOnRight = parent.Right == current; 664Debug.Assert(match.Right == null); 671Debug.Assert((successor.Right == null && successor.IsRed) || (successor.Right!.IsRed && successor.IsBlack)); 673successor.Right?.ColorBlack(); 678parentOfSuccessor.Left = successor.Right; 679successor.Right = match.Right; 704current = order < 0 ? current.Left : current.Right; 736current = order < 0 ? current.Left : current.Right; 752current = current.Right; 957root.Right.ColorRed(); 1493while (current.Right != null) 1495current = current.Right; 1620public bool Is2Node => IsBlack && IsNullOrBlack(Left) && IsNullOrBlack(Right); 1622public bool Is4Node => IsNonNullRed(Left) && IsNonNullRed(Right); 1649if (next.source.Right is Node right) 1665Debug.Assert(IsNonNullRed(sibling.Left) || IsNonNullRed(sibling.Right)); 1682Debug.Assert(node == Left ^ node == Right); 1684return node == Left ? Right! : Left!; 1692Debug.Assert(Right != null); 1696Right.ColorBlack(); 1713removeRed = Right!.Right!; 1718Debug.Assert(Right!.Left!.IsRed); 1721Debug.Assert(Left!.Right!.IsRed); 1734Node child = Right!; 1746Node grandChild = child.Right!; 1748Left = grandChild.Right; 1761Left = child.Right; 1771Node child = Right!; 1776child.Left = grandChild.Right; 1788Debug.Assert(Right!.Is2Node); 1793Right.ColorRed(); 1818private int GetCount() => 1 + (Left?.GetCount() ?? 0) + (Right?.GetCount() ?? 0); 1820private bool HasChild(Node child) => child == Left || child == Right; 1826return (Left == child1 && Right == child2) 1827|| (Left == child2 && Right == child1); 1878next = (_reverse ? node.Right : node.Left); 1879other = (_reverse ? node.Left : node.Right); 1913Node? node = (_reverse ? _current.Left : _current.Right); 1917next = (_reverse ? node.Right : node.Left); 1918other = (_reverse ? node.Left : node.Right);
System\Collections\Generic\SortedSet.TreeSubSet.cs (7)
138current = current.Right; 177current = current.Right; 207current = current.Right; 223Node? node = current.Right; 233node = node.Right; 268if (current.Right != null && (!_uBoundActive || Comparer.Compare(_max, current.Item) > 0)) 270processQueue.Enqueue(current.Right);