Class
RedBlackTree<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:

cs-api-definition
[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: RedBlackTree<TKey, TValue>

Implements: ICollection<T>IEnumerableIEnumerable<T>ISearchTree<T>

Inherited Members BinarySearchTreeBase<T>.Add(T)BinarySearchTreeBase<T>.Clear()BinarySearchTreeBase<T>.Contains(T)BinarySearchTreeBase<T>.CopyTo(T[], int)BinarySearchTreeBase<T>.DepthFirstTraversal(IVisitor<T>)BinarySearchTreeBase<T>.GetEnumerator()BinarySearchTreeBase<T>.GetOrderedEnumerator()BinarySearchTreeBase<T>.Remove(T)BinarySearchTreeBase<T>.FindMaximumNode(BinaryTree<T>)BinarySearchTreeBase<T>.FindMinimumNode(BinaryTree<T>)BinarySearchTreeBase<T>.ClearItems()BinarySearchTreeBase<T>.FindMaximumNode()BinarySearchTreeBase<T>.FindMinimumNode()BinarySearchTreeBase<T>.FindNode(T)BinarySearchTreeBase<T>.FindNode<TSearch>(TSearch, BinarySearchTreeBase<T>.CustomComparison<TSearch>)BinarySearchTreeBase<T>.ComparerBinarySearchTreeBase<T>.CountBinarySearchTreeBase<T>.IsEmptyBinarySearchTreeBase<T>.IsReadOnlyBinarySearchTreeBase<T>.HeightBinarySearchTreeBase<T>.MaximumBinarySearchTreeBase<T>.MinimumBinarySearchTreeBase<T>.Tree

Constructors

RedBlackTree()

Initializes a new instance of the RedBlackTree<T> class.

Declaration

cs-api-definition
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

cs-api-definition
public RedBlackTree(Comparison<T> comparison)

Parameters

comparison

Comparison<T>

The comparison.

RedBlackTree(IComparer<T>)

Initializes a new instance of the RedBlackTree<T> class.

Declaration

cs-api-definition
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

cs-api-definition
protected override void AddItem(T item)

Parameters

item

T

The item.

Overrides BinarySearchTreeBase<T>.AddItem(T)

RemoveItem(T)

Removes the element with the specified key from the IDictionary<TKey, TValue>.

Declaration

cs-api-definition
protected override bool RemoveItem(T item)

Parameters

item

T

The item to remove.

Returns

bool

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 BinarySearchTreeBase<T>.RemoveItem(T)