Go - Using a container/heap to implement a priority queue
- by Seth Hoenig
In the big picture, I'm trying to implement Dijkstra's algorithm using a priority queue.
According to members of golang-nuts, the idiomatic way to do this in Go is to use the heap interface with a custom underlying data structure. So I have created Node.go and PQueue.go like so:
//Node.go
package pqueue
type Node struct {
row int
col…