Show / Hide Table of Contents

Interface IHeap<T>

Stores items based on priorities and allows access to the highest priority item.

Inherited Members
IDataStructure<T>.ToArray()
ISteppable<T>.StepperBreak<TStep>(TStep)
DataStructure.ICountable.Count
DataStructure.IClearable.Clear()
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 Source

Dequeue()

Removes and returns the highest priority item.

Declaration
T Dequeue()
Returns
Type Description
T

The highest priority item from the heap.

| Improve this Doc View Source

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.

| Improve this Doc View Source

Peek()

Returns the highest priority item.

Declaration
T Peek()
Returns
Type Description
T

The highest priority item in the heap.

Extension Methods

Steppable.Stepper<T>(ISteppable<T>, Action<T>)
Steppable.Stepper<T, TStep>(ISteppable<T>, TStep)
Steppable.StepperBreak<T>(ISteppable<T>, Func<T, StepStatus>)
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX