Click or drag to resize
Accord.NET (logo)

RedBlackTreeDictionaryTKey, TValue Class

Sorted dictionary based on a red-black tree.
Inheritance Hierarchy
SystemObject
  Accord.CollectionsRedBlackTreeDictionaryTKey, TValue

Namespace:  Accord.Collections
Assembly:  Accord (in Accord.dll) Version: 3.8.0
Syntax
[SerializableAttribute]
public class RedBlackTreeDictionary<TKey, TValue> : IEnumerable
Request Example View Source

Type Parameters

TKey
The type of keys in the collection.
TValue
The type of the values in the collection

The RedBlackTreeDictionaryTKey, TValue type exposes the following members.

Constructors
  NameDescription
Public methodRedBlackTreeDictionaryTKey, TValue
Creates a new RedBlackTreeDictionaryTKey, TValue using the default comparer for the TKey.
Public methodRedBlackTreeDictionaryTKey, TValue(IComparerTKey)
Creates a new RedBlackTreeDictionaryTKey, TValue.
Top
Properties
  NameDescription
Public propertyCount
Gets the number of elements on this dictionary.
Public propertyIsReadOnly
Gets a value indicating whether this instance is read only.
Public propertyItem
Gets or sets the element with the specified key.
Public propertyKeys
Gets an ICollectionT containing the keys of the RedBlackTreeDictionaryTKey, TValue.
Public propertyValues
Gets an ICollectionT containing the values of the RedBlackTreeDictionaryTKey, TValue.
Top
Methods
  NameDescription
Public methodAdd(KeyValuePairTKey, TValue)
Adds an element with the provided key and value to the dictionary.
Public methodAdd(TKey, TValue)
Adds an element with the provided key and value to the IDictionaryTKey, TValue.
Public methodClear
Removes all elements from the dictionary.
Public methodContains
Determines whether the dictionary contains a specific value.
Public methodContainsKey
Determines whether the dictionary contains an element with the specified key.
Public methodCopyTo
Copies the elements of this dictionary to an array, starting at a particular array index.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetEnumerator
Returns an enumerator that iterates through the dictionary.
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetNext
Gets the next key-value pair in the dictionary whose key is the immediate successor to the given key.
Public methodGetPrevious
Gets the next key-value pair in the dictionary whose key is the immediate ancestor of the given key.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodMax
Gets the pair with the maximum key stored in the dictionary.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodMin
Gets the pair with the minimum key stored in the dictionary.
Public methodRemove(KeyValuePairTKey, TValue)
Removes the first occurrence of a specific object from the dictionary.
Public methodRemove(TKey)
Removes the element with the specified key from the dictionary.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodTryGetNext
Gets the next key-value pair in the dictionary whose key is the immediate successor to the given key.
Public methodTryGetPrevious
Gets the next key-value pair in the dictionary whose key is the immediate ancestor of the given key.
Public methodTryGetValue
Gets the value associated with the specified key.
Top
Extension Methods
  NameDescription
Public Extension MethodHasMethod
Checks whether an object implements a method with the given name.
(Defined by ExtensionMethods.)
Public Extension MethodIsEqual
Compares two objects for equality, performing an elementwise comparison if the elements are vectors or matrices.
(Defined by Matrix.)
Public Extension MethodSetEqualsKeyValuePairTKey, TValue
Compares two enumerables for set equality. Two enumerables are set equal if they contain the same elements, but not necessarily in the same order.
(Defined by Matrix.)
Public Extension MethodTo(Type)Overloaded.
Converts an object into another type, irrespective of whether the conversion can be done at compile time or not. This can be used to convert generic types to numeric types during runtime.
(Defined by ExtensionMethods.)
Public Extension MethodToTOverloaded.
Converts an object into another type, irrespective of whether the conversion can be done at compile time or not. This can be used to convert generic types to numeric types during runtime.
(Defined by ExtensionMethods.)
Top
See Also