Wintellect.PowerCollections Namespace
Algorithms Class
GhostDoc Pro Sample Help File

Bag<(Of <(<'T>)>)>..::..IsSupersetOf Method

Determines if this bag is a superset of another bag. Neither bag is modified. This bag is a superset of otherBag if every element in otherBag is also in this bag, at least the same number of times.

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

Syntax


public bool IsSupersetOf(
	Bag<T> otherBag
)
Public Function IsSupersetOf ( _
	otherBag As Bag(Of T) _
) As Boolean
public:
bool^ IsSupersetOf(
	Bag<T>^ otherBag
)

Parameters

otherBag
Type: Wintellect.PowerCollections..::..Bag<(Of <(<'T>)>)>
Bag to compare to.

Return Value

True if this is a superset of otherBag.

Exceptions


ExceptionCondition
InvalidOperationExceptionThis bag and otherBag don't use the same method for comparing items.

Remarks


IsSupersetOf is computed in time O(M), where M is the number of unique items in otherBag.