Class FixedSizeMinHeap<TKey>
Inheritance
FixedSizeMinHeap<TKey>
Assembly: ZoneTree.dll
Syntax
public sealed class FixedSizeMinHeap<TKey>
Type Parameters
Constructors
|
Improve this Doc
View Source
FixedSizeMinHeap(int, IRefComparer<TKey>)
Declaration
public FixedSizeMinHeap(int maximumSize, IRefComparer<TKey> comparer)
Parameters
Properties
|
Improve this Doc
View Source
Count
Declaration
public int Count { get; }
Property Value
|
Improve this Doc
View Source
Keys
Declaration
public ReadOnlySpan<TKey> Keys { get; }
Property Value
|
Improve this Doc
View Source
MinValue
Declaration
public TKey MinValue { get; }
Property Value
|
Improve this Doc
View Source
Size
Declaration
Property Value
Methods
|
Improve this Doc
View Source
Clear()
Declaration
|
Improve this Doc
View Source
Insert(in TKey)
Inserts the new element, maintaining the heap property.
If the element is greater than the current min element, this function returns
false without modifying the heap. Otherwise, it returns true.
Declaration
public bool Insert(in TKey key)
Parameters
Type |
Name |
Description |
TKey |
key |
|
Returns
Type |
Description |
bool |
true if inserted
|
|
Improve this Doc
View Source
RemoveMin()
Declaration
|
Improve this Doc
View Source
ReplaceMin(TKey)
Replaces the minimum value in the heap with the user-provided value, and restores
the heap property.
Declaration
public void ReplaceMin(TKey newKey)
Parameters
Type |
Name |
Description |
TKey |
newKey |
|