Class RedBlackTree<TData>
Represents a generic red-black tree
Inheritance
RedBlackTree<TData>
Assembly: Solti.Utils.Primitives.dll
Syntax
public class RedBlackTree<TData> : Object
Type Parameters
Constructors
RedBlackTree(IComparer<TData>)
Declaration
public RedBlackTree(IComparer<TData> comparer)
Parameters
Type |
Name |
Description |
IComparer<TData> |
comparer |
|
Properties
Comparer
Declaration
public IComparer<TData> Comparer { get; }
Property Value
Count
Declaration
public int Count { get; }
Property Value
Root
Declaration
public RedBlackTreeNode<TData> Root { get; }
Property Value
Methods
Add(TData)
Adds a new data
to this tree.
Declaration
public bool Add(TData data)
Parameters
Type |
Name |
Description |
TData |
data |
|
Returns
Add(RedBlackTreeNode<TData>)
Adds a new node
to this tree.
Declaration
public bool Add(RedBlackTreeNode<TData> node)
Parameters
Returns
GetEnumerator()
Returns an enumerator that iterates through the nodes.
Declaration
public IEnumerator<RedBlackTreeNode<TData>> GetEnumerator()
Returns
With(TData)
Creates a new tree containing the new data
.
Declaration
public RedBlackTree<TData> With(TData data)
Parameters
Type |
Name |
Description |
TData |
data |
|
Returns
With(RedBlackTreeNode<TData>)
Creates a new tree containing the new node
.
Declaration
public RedBlackTree<TData> With(RedBlackTreeNode<TData> node)
Parameters
Returns
Implements
Extension Methods