Class BinomialHeap<T>
A binomial minMax heap implementation.
Inheritance
BinomialHeap<T>
Assembly: Advanced.Algorithms.dll
Syntax
public class BinomialHeap<T> : IEnumerable<T>, IEnumerable where T : IComparable
Type Parameters
Constructors
|
Improve this Doc
View Source
BinomialHeap(SortDirection)
Declaration
public BinomialHeap(SortDirection sortDirection = SortDirection.Ascending)
Parameters
Properties
|
Improve this Doc
View Source
Count
Declaration
public int Count { get; }
Property Value
Methods
|
Improve this Doc
View Source
Time complexity: O(log(n)).
Declaration
Returns
|
Improve this Doc
View Source
GetEnumerator()
Declaration
public IEnumerator<T> GetEnumerator()
Returns
|
Improve this Doc
View Source
Insert(T)
Time complexity: O(log(n)).
Declaration
public void Insert(T newItem)
Parameters
Type |
Name |
Description |
T |
newItem |
|
|
Improve this Doc
View Source
Merge(BinomialHeap<T>)
Time complexity: O(log(n)).
Declaration
public void Merge(BinomialHeap<T> binomialHeap)
Parameters
Type |
Name |
Description |
BinomialHeap<T> |
binomialHeap |
The heap to union with.
|
|
Improve this Doc
View Source
Peek()
Time complexity: O(log(n)).
Declaration
Returns
|
Improve this Doc
View Source
UpdateKey(T, T)
Time complexity: O(log(n)).
Declaration
public void UpdateKey(T currentValue, T newValue)
Parameters
Type |
Name |
Description |
T |
currentValue |
The value to update.
|
T |
newValue |
The updated new value.
|
Explicit Interface Implementations
|
Improve this Doc
View Source
IEnumerable.GetEnumerator()
Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
Implements