T_PurpleKingdomGames_Core_Collections_BinaryHeap_1 - PurpleKingdomGames/CoreLibs GitHub Wiki

BinaryHeap(T) Class

A binary heap implementation for any types that extend IComparable

Inheritance Hierarchy

System.Object
  PurpleKingdomGames.Core.Collections.BinaryHeap(T)
Namespace: PurpleKingdomGames.Core.Collections
Assembly: PurpleKingdomGamesCore (in PurpleKingdomGamesCore.dll) Version: 1.0.0.0 (1.0.0.0)

Syntax

C#

public class BinaryHeap<T>
where T : IComparable

Type Parameters

 

T
Any type that extends IComparable
  The BinaryHeap(T) type exposes the following members.

Constructors

 

Name Description
Public method BinaryHeap(T) Initializes a new instance of the BinaryHeap(T) class
  Back to Top

Methods

 

Name Description
Public method Add Add a single item to the heap
Public method Equals Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method GetType Gets the type of the current instance. (Inherited from Object.)
Public method IndexOf Gets the index of the specified item in the heap
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method Remove Get the lowest value from the top of the heap
Public method Sort Resort the heap from the specified index. Used when an items value changes
Public method ToString Returns a string that represents the current object. (Inherited from Object.)
  Back to Top

Properties

 

Name Description
Public property Count The number of items on the heap
  Back to Top

See Also

Reference

PurpleKingdomGames.Core.Collections Namespace

⚠️ **GitHub.com Fallback** ⚠️