ClassRedBlackTree<T>
Red-Black tree data structure.
Definition
Namespace:Telerik.Windows.Diagrams.Core
Assembly:Telerik.Windows.Diagrams.Core.dll
Type Parameters:
T
The data type contained in the tree.
Syntax:
[SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
public class RedBlackTree<T> : BinarySearchTreeBase<T>, ISearchTree<T>, ICollection<T>, IEnumerable<T>, IEnumerable
Inheritance: objectBinarySearchTreeBase<T>RedBlackTree<T>
Derived Classes:
Implements:
Inherited Members
Constructors
RedBlackTree()
Initializes a new instance of the RedBlackTree<T> class.
Declaration
public RedBlackTree()
Remarks
The default comparer for the data type will be used.
RedBlackTree(Comparison<T>)
Initializes a new instance of the RedBlackTree<T> class.
Declaration
public RedBlackTree(Comparison<T> comparison)
Parameters
comparison
Comparison<T>
The comparison.
RedBlackTree(IComparer<T>)
Initializes a new instance of the RedBlackTree<T> class.
Declaration
public RedBlackTree(IComparer<T> comparer)
Parameters
comparer
IComparer<T>
The comparer.
Methods
AddItem(T)
Adds an element with the provided key and value to the IDictionary<TKey, TValue>.
Declaration
protected override void AddItem(T item)
Parameters
item
T
The item.
Overrides
RemoveItem(T)
Removes the element with the specified key from the IDictionary<TKey, TValue>.
Declaration
protected override bool RemoveItem(T item)
Parameters
item
T
The item to remove.
Returns
true if the element is successfully removed; otherwise, false. This method also returns false if key was not found in the original IDictionary<TKey, TValue>.
Overrides