Class RedBlackTree<T>.Node
- Namespace
- AlgorithmsSW.SearchTrees
- Assembly
- AlgorithmsSW.dll
public class RedBlackTree<T>.Node : INode<T>
- Inheritance
-
RedBlackTree<T>.Node
- Implements
-
INode<T>
- Inherited Members
- Extension Methods
Constructors
Node(T, int, bool, Node?, Node?)
public Node(T item, int count, bool isRed = false, RedBlackTree<T>.Node? leftChild = null, RedBlackTree<T>.Node? rightRight = null)
Parameters
item
Tcount
intisRed
boolleftChild
RedBlackTree<T>.NoderightRight
RedBlackTree<T>.Node
Fields
Count
public int Count
Field Value
LeftChild
public RedBlackTree<T>.Node? LeftChild
Field Value
- RedBlackTree<T>.Node
RightChild
public RedBlackTree<T>.Node? RightChild
Field Value
- RedBlackTree<T>.Node
Properties
IsLeaf
public bool IsLeaf { get; }
Property Value
Item
Gets or sets the item in the node.
public T Item { get; set; }
Property Value
- T
Methods
GetCount(Node?)
public static int GetCount(RedBlackTree<T>.Node? node)
Parameters
node
RedBlackTree<T>.Node
Returns
IsNotNullAndRed(Node?)
public static bool IsNotNullAndRed(RedBlackTree<T>.Node? node)
Parameters
node
RedBlackTree<T>.Node
Returns
RotateLeft()
public RedBlackTree<T>.Node RotateLeft()
Returns
- RedBlackTree<T>.Node
RotateRight()
public RedBlackTree<T>.Node RotateRight()
Returns
- RedBlackTree<T>.Node
SetBlack()
public void SetBlack()
SetRed()
public void SetRed()
SetRedAndChildrenBlack()
public void SetRedAndChildrenBlack()