PowerCollections: Introduction
If you're still not aware of the Wintellect PowerCollections, now is the time. This library was designed to extend the standard class library with new containers and pre-written algorithms. A list of the containers with short descriptions follows:
- Bag<T>
- is a collection that contains items of type T. It's like a set, but allows duplicate values. - BigList
<T> - provides a list of indexed items, like the standard List class. However, BigList is optimized for efficient operations on large lists, especially for insertions, deletions, copies, and concatenations. - Deque<T>
- is an implementation of so-called Double Ended Queue. That means, in a Deque, items can be added to the beginning or end equally efficiently, regardless of the number of items in the Deque. However, a Deque is a little bit slower than a List when being indexed to read elements. - MultiDictionary
<TKey, TValue> - is a class that associates values with a key. Unlike a standard Dictionary, a key can have multiple values (Enumeration) associated with it. - OrderedBag<T> - is a collection that contains items of type T in a sort order, and allows duplicate values in it.
- OrderedDictionary<TKey, TValue> - is a collection that maps items of type TKey to items of type TValue. Only one value (which can be null) per key is allowed. The inner structure is a balanced binary (sorted) tree. Unlike Dictionary, keys of this collection are compared through the compare function, not by hash.
- OrderedMultiDictionary<TKey, TValue> - is a collection like OrderedDictionary, but allows more than one value per a key. All these values are stored in sorted order as well as keys.
- OrderedSet<T> - a collection that stores items of type T in sorted order, and doesn't allow duplicates.
- Set<T> - is a collection that just stores unique items of type T. Items are compared through the Comparable interface or the Equal method.