Click or drag to resize

BinaryHeapTElement Constructor

Namespace:  SD.Tools.Algorithmia.Heaps
Assembly:  SD.Tools.Algorithmia (in SD.Tools.Algorithmia.dll) Version: 1.3.3.0 (1.3.18.0209)
Syntax
public BinaryHeap(
	Comparison<TElement> keyCompareFunc,
	bool isMinHeap
)

Parameters

keyCompareFunc
Type: SystemComparisonTElement
The key compare func, which is used to compare two elements based on their key. Based on the type of the heap, min heap or max heap, the first element is placed as parent or as child: if this heap is a min-heap, and the first element, according to keyCompareFunc is bigger than the second element, the second element will be the parent of the first element. In a max-heap, the first element will be the parent of the second element in that situation.
isMinHeap
Type: SystemBoolean
Flag to signal if this heap is a min heap or a max heap
See Also