Wintellect.PowerCollections Namespace
Algorithms Class
GhostDoc Pro Sample Help File

OrderedBag<(Of <(<'T>)>)>..::..NumberOfCopies Method

Returns the number of copies of item in the bag. More precisely, returns the number of items in the bag that compare equal to item.

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

Syntax


public int NumberOfCopies(
	T item
)
Public Function NumberOfCopies ( _
	item As T _
) As Integer
public:
int^ NumberOfCopies(
	T item
)

Parameters

item
Type: T
The item to search for in the bag.

Return Value

The number of items in the bag that compare equal to item.

Remarks


NumberOfCopies() takes time O(log N + M), where N is the total number of items in the bag, and M is the number of copies of item in the bag.