previous |
index
Implementation Notes
- Open and Closed can be implemented
using java.util.Hashtable.
- However, classes implementing State, for example, BlockState,
must override the Object class's
hashCode method.
- Priority queue "promotion" is not offered by java.util.PriorityQueue.
- However, it can be faked by removing from
the priority queue and then adding the same state with a new key.
-
A more efficient promotion operation can be implemented in
your BinaryHeap class by decreasing a node's key and then successively
swapping places with its parent as when a
new node is added.
previous |
index