Wintellect.PowerCollections Namespace
Algorithms Class
GhostDoc Pro Sample Help File

OrderedSet<(Of <(<'T>)>)>..::..Difference Method

Computes the difference of this set with another set. The difference of these two sets is all items that appear in this set, but not in otherSet. A new set is created with the difference of the sets and is returned. This set and the other set are unchanged.

Namespace:  Wintellect.PowerCollections
Assembly:  PowerCollections (in PowerCollections.dll)

Syntax


public OrderedSet<T> Difference(
	OrderedSet<T> otherSet
)
Public Function Difference ( _
	otherSet As OrderedSet(Of T) _
) As OrderedSet(Of T)
public:
OrderedSet<T>^ Difference(
	OrderedSet<T>^ otherSet
)

Parameters

otherSet
Type: Wintellect.PowerCollections..::..OrderedSet<(Of <(<'T>)>)>
Set to difference with.

Return Value

The difference of the two sets.

Exceptions


ExceptionCondition
InvalidOperationExceptionThis set and otherSet don't use the same method for comparing items.

Remarks


The difference of two sets is computed in time O(M + N log M), where M is the size of the larger set, and N is the size of the smaller set.