OrderedSet<(Of <(<'T>)>)> Class
OrderedSet<T> is a collection that contains items of type T.
The item are maintained in a sorted order, and duplicate items are not allowed. Each item has
an index in the set: the smallest item has index 0, the next smallest item has index 1,
and so forth.
Namespace:
Wintellect.PowerCollections
Assembly:
PowerCollections (in PowerCollections.dll)
Syntax
[SerializableAttribute] public class OrderedSet<T> : CollectionBase<T>
<SerializableAttribute> _ Public Class OrderedSet(Of T) _ Inherits CollectionBase(Of T)
[SerializableAttribute] generic<typename T> public ref class OrderedSet : public CollectionBase<T>
Type Parameters
- T
Remarks
The items are compared in one of three ways. If T implements IComparable<TKey> or IComparable, then the CompareTo method of that interface will be used to compare items. Alternatively, a comparison function can be passed in either as a delegate, or as an instance of IComparer<TKey>.
OrderedSet 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.
Set<(Of <(<'T>)>)> is similar, but uses hashing instead of comparison, and does not maintain the items in sorted order.
Inheritance Hierarchy
Wintellect.PowerCollections..::..CollectionBase<(Of <(<'T>)>)>
Wintellect.PowerCollections..::..OrderedSet<(Of <(<'T>)>)>