[Missing <summary> documentation for "N:Iesi.Collections"]

Classes

  ClassDescription
Public classDictionarySet

DictionarySet is an abstract class that supports the creation of new Set types where the underlying data store is an IDictionary instance.

You can use any object that implements the IDictionary interface to hold set data. You can define your own, or you can use one of the objects provided in the Framework. The type of IDictionary you choose will affect both the performance and the behavior of the Set using it.

To make a Set typed based on your own IDictionary, simply derive a new class with a constructor that takes no parameters. Some Set implmentations cannot be defined with a default constructor. If this is the case for your class, you will need to override Clone() as well.

It is also standard practice that at least one of your constructors takes an ICollection or an ISet as an argument.

Public classHashedSet
Implements a Set based on a hash table. This will give the best lookup, add, and remove performance for very large data-sets, but iteration will occur in no particular order.
Public classHybridSet
Implements a Set that automatically changes from a list to a hash table when the size reaches a certain threshold. This is good if you are unsure about whether you data-set will be tiny or huge. Because this uses a dual implementation, iteration order is not guaranteed!
Public classImmutableSet

Implements an immutable (read-only) Set wrapper.

Although this is advertised as immutable, it really isn't. Anyone with access to the basisSet can still change the data-set. So GetHashCode() is not implemented for this Set, as is the case for all Set implementations in this library. This design decision was based on the efficiency of not having to Clone() the basisSet every time you wrap a mutable Set.

Public classListSet
Implements a Set based on a list. Performance is much better for very small lists than either HashedSet or SortedSet. However, performance degrades rapidly as the data-set gets bigger. Use a HybridSet instead if you are not sure your data-set will always remain very small. Iteration produces elements in the order they were added. However, element order is not guaranteed to be maintained by the various Set mathematical operators.
Public classSet
A collection that contains no duplicate elements.
Public classSortedSet
Implements a set based on a sorted tree. This gives good performance for operations on very large data-sets, though not as good - asymptotically - as a HashedSet. However, iteration occurs in order. Elements that you put into this type of collection must implement IComparable, and they must actually be comparable. You can't mix String and Int32 values, for example.
Public classSynchronizedSet
Implements a thread-safe ISet wrapper.

Interfaces

  InterfaceDescription
Public interfaceISet

A collection that contains no duplicate elements. This interface models the mathematical Set abstraction. The order of elements in a set is dependant on (a)the data-structure implementation, and (b)the implementation of the various Set methods, and thus is not guaranteed.

None of the Set implementations in this library are guranteed to be thread-safe in any way unless wrapped in a SynchronizedSet.

The following table summarizes the binary operators that are supported by the Set class.

OperationDescriptionMethod
Union (OR)Element included in result if it exists in either A OR B.Union()
Intersection (AND)Element included in result if it exists in both A AND B.InterSect()
Exclusive Or (XOR)Element included in result if it exists in one, but not both, of A and B.ExclusiveOr()
Minus (n/a)Take all the elements in A. Now, if any of them exist in B, remove them. Note that unlike the other operators, A - B is not the same as B - A.Minus()