OrderedDictionary<(Of <(<'TKey, TValue>)>)> Class
OrderedDictionary<TKey, TValue> is a collection that maps keys of type TKey
to values of type TValue. The keys are maintained in a sorted order, and at most one value
is permitted for each key.
Namespace:
Wintellect.PowerCollections
Assembly:
PowerCollections (in PowerCollections.dll)
Syntax
[SerializableAttribute] public class OrderedDictionary<TKey, TValue> : DictionaryBase<TKey, TValue>
<SerializableAttribute> _ Public Class OrderedDictionary(Of TKey, TValue) _ Inherits DictionaryBase(Of TKey, TValue)
[SerializableAttribute] generic<typename TKey, typename TValue> public ref class OrderedDictionary : public DictionaryBase<TKey, TValue>
Type Parameters
- TKey
- TValue
Remarks
The keys are compared in one of three ways. If TKey implements IComparable<TKey> or IComparable, then the CompareTo method of that interface will be used to compare elements. Alternatively, a comparison function can be passed in either as a delegate, or as an instance of IComparer<TKey>.
OrderedDictionary is implemented as a balanced binary tree. Inserting, deleting, and looking up an an element all are done in log(N) type, where N is the number of keys in the tree.
Dictionary is similar, but uses hashing instead of comparison, and does not maintain the keys in sorted order.
Inheritance Hierarchy
Wintellect.PowerCollections..::..CollectionBase<(Of <(<'KeyValuePair<(Of <(<'TKey, TValue>)>)>>)>)>
Wintellect.PowerCollections..::..DictionaryBase<(Of <(<'TKey, TValue>)>)>
Wintellect.PowerCollections..::..OrderedDictionary<(Of <(<'TKey, TValue>)>)>