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

Classes

  ClassDescription
Public classDictionarySet<(Of <(<'T>)>)>

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<(Of <(<'T>)>)>
Implements a Set based on a Dictionary (which is equivalent of non-genric HashTable) This will give the best lookup, add, and remove performance for very large data-sets, but iteration will occur in no particular order.
Public classImmutableSet<(Of <(<'T>)>)>

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 classOrderedSet<(Of <(<'T>)>)>
Implements an ordered Set based on a dictionary.
Public classSet<(Of <(<'T>)>)>

A collection that contains no duplicate elements. This class models the mathematical Set abstraction, and is the base class for all other Set implementations. 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.

OperationDescriptionMethodOperator
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()-
Public classSortedSet<(Of <(<'T>)>)>
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 int values, for example.
Public classSynchronizedSet<(Of <(<'T>)>)>

Implements a thread-safe Set wrapper. The implementation is extremely conservative, serializing critical sections to prevent possible deadlocks, and locking on everything. The one exception is for enumeration, which is inherently not thread-safe. For this, you have to lock the SyncRoot object for the duration of the enumeration.

Interfaces

  InterfaceDescription
Public interfaceISet<(Of <(<'T>)>)>

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()