Interface IHeap<T>
Stores items based on priorities and allows access to the highest priority item.
Inherited Members
Namespace: Towel.DataStructures
Assembly: Towel.dll
Syntax
public interface IHeap<T> : IDataStructure<T>, ISteppable<T>, System.Collections.Generic.IEnumerable<T>, DataStructure.ICountable, DataStructure.IClearable
Type Parameters
Name | Description |
---|---|
T | The type of values stored in this data structure. |
Methods
| Improve this Doc View SourceDequeue()
Removes and returns the highest priority item.
Declaration
T Dequeue()
Returns
Type | Description |
---|---|
T | The highest priority item from the heap. |
Enqueue(T)
Enqueues an item into the heap.
Declaration
void Enqueue(T value)
Parameters
Type | Name | Description |
---|---|---|
T | value | The value to queue in the heap. |
Peek()
Returns the highest priority item.
Declaration
T Peek()
Returns
Type | Description |
---|---|
T | The highest priority item in the heap. |