A* Pathfinding Project  3.1.4
The A* Pathfinding Project for Unity 3D
 All Classes Namespaces Files Functions Variables Enumerations Properties Groups Pages
BinaryHeapM Class Reference

Binary heap implementation. More...

+ Collaboration diagram for BinaryHeapM:

Public Member Functions

 BinaryHeapM (int numberOfElements)
 
void Add (NodeRun node)
 Adds a node to the heap.
 
void Clear ()
 
NodeRun GetNode (int i)
 
void Rebuild ()
 Rebuilds the heap by trickeling down all items.
 
NodeRun Remove ()
 Returns the node with the lowest F score from the heap.
 

Public Attributes

float growthFactor = 2
 
int numberOfItems
 

Private Attributes

NodeRun[] binaryHeap
 

Detailed Description

Binary heap implementation.

Binary heaps are really fast for ordering nodes in a way that makes it possible to get the node with the lowest F score. Also known as a priority queue.

See Also
http://en.wikipedia.org/wiki/Binary_heap

Member Function Documentation

void Rebuild ( )

Rebuilds the heap by trickeling down all items.

Usually called after the hTarget on a path has been changed


The documentation for this class was generated from the following file: