Class BinomialMinHeap<T>
A binomial min heap implementation.
Inherited Members
Namespace: Advanced.Algorithms.DataStructures
Assembly: Advanced.Algorithms.dll
Syntax
public class BinomialMinHeap<T> : IEnumerable<T>, IEnumerable where T : IComparable
Type Parameters
Name | Description |
---|---|
T |
Properties
Count
Declaration
public int Count { get; }
Property Value
Type | Description |
---|---|
Int32 |
Methods
DecrementKey(T, T)
Time complexity: O(log(n)).
Declaration
public void DecrementKey(T currentValue, T newValue)
Parameters
Type | Name | Description |
---|---|---|
T | currentValue | The value to increment. |
T | newValue | The incremented new value. |
ExtractMin()
Time complexity: O(log(n)).
Declaration
public T ExtractMin()
Returns
Type | Description |
---|---|
T |
GetEnumerator()
Declaration
public IEnumerator<T> GetEnumerator()
Returns
Type | Description |
---|---|
IEnumerator<T> |
Insert(T)
Time complexity: O(log(n)).
Declaration
public void Insert(T newItem)
Parameters
Type | Name | Description |
---|---|---|
T | newItem |
Merge(BinomialMinHeap<T>)
Time complexity: O(log(n)).
Declaration
public void Merge(BinomialMinHeap<T> binomialHeap)
Parameters
Type | Name | Description |
---|---|---|
BinomialMinHeap<T> | binomialHeap | The heap to union with. |
PeekMin()
Time complexity: O(log(n)).
Declaration
public T PeekMin()
Returns
Type | Description |
---|---|
T |
Explicit Interface Implementations
IEnumerable.GetEnumerator()
Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
Type | Description |
---|---|
IEnumerator |