MinHeap

Priority queue (min-heap) for A* pathfinding.

Constructor

new MinHeap()

Members

size

Methods

isEmpty() → {boolean}

Returns:

True if empty.

Type: 
boolean

pop() → {Object|null}

Remove and return the lowest-cost item.

Returns:

Lowest cost item, or null if empty.

Type: 
Object | null

push(item)

Push an item into the priority queue.

Parameters:
NameTypeDescription
itemObject

Heap item with f, h, and order properties.