Show / Hide Table of Contents

Class BinaryHeap<T>

Implements a priority queue in the form of a binairy heap.

Inheritance
System.Object
BinaryHeap<T>
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: System.Dynamic.ExpandoObject
Assembly: cs.temp.dll.dll
Syntax
public class BinaryHeap<T>
Type Parameters
T

Constructors

BinaryHeap()

Creates a new binairy heap.

Declaration
public BinaryHeap()

BinaryHeap(UInt32)

Creates a new binairy heap.

Declaration
public BinaryHeap(uint initialSize)
Parameters
System.UInt32 initialSize

Properties

Count

Returns the number of items in this queue.

Declaration
public int Count { get; }
Property Value
System.Int32

Methods

Clear()

Clears this priority queue.

Declaration
public void Clear()

Peek()

Returns the object with the smallest weight.

Declaration
public T Peek()
Returns
T

PeekWeight()

Returns the smallest weight in the queue.

Declaration
public float PeekWeight()
Returns
System.Single

Pop()

Returns the object with the smallest weight and removes it.

Declaration
public T Pop()
Returns
T

Push(T, Single)

Enqueues a given item.

Declaration
public void Push(T item, float priority)
Parameters
T item

System.Single priority

Back to top Built by Itinero, MIT licensed.