Class PairingHeap<T>
A pairing minMax heap implementation.
Inheritance
PairingHeap<T>
Assembly: Advanced.Algorithms.dll
Syntax
public class PairingHeap<T> : IEnumerable<T>, IEnumerable where T : IComparable
Type Parameters
Constructors
|
Improve this Doc
View Source
PairingHeap(SortDirection)
Declaration
public PairingHeap(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)
Insert a new Node.
Time complexity: O(1).
Declaration
public void Insert(T newItem)
Parameters
Type |
Name |
Description |
T |
newItem |
|
|
Improve this Doc
View Source
Merge(PairingHeap<T>)
Merge another heap with this heap.
Time complexity: O(1).
Declaration
public void Merge(PairingHeap<T> pairingHeap)
Parameters
|
Improve this Doc
View Source
Peek()
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 |
|
T |
newValue |
|
Explicit Interface Implementations
|
Improve this Doc
View Source
IEnumerable.GetEnumerator()
Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
Implements