Microsoft.Samples.Collections

Heap Constructor (IComparer, Int32)

Construct a heap specifying an object to perform comparisons between heap members and a dynamic allocation size.

public Heap(
   IComparer comparer,
   int incrementSize
);

Parameters

comparer
An object to perform comparisons between heap members.
incrementSize
The amount to increase and decrease the heap's storage by.

Remarks

When the heap runs out of storage it will allocate more in chunks sized at incrementSize multiplied by the storage size of object.When elements are removed from the heap, if it has too much stoarge by the amount incrementSize it will discard it.

See Also

Heap Class | Microsoft.Samples.Collections Namespace | Heap Constructor Overload List