MCPcopy Create free account
hub / github.com/GoMudEngine/GoMud / Pop

Method Pop

internal/mapper/mapper.path.go:77–84  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

75 *pq = append(*pq, n)
76}
77func (pq *priorityQueue) Pop() interface{} {
78 old := *pq
79 n := old[len(old)-1]
80 old[len(old)-1] = nil // avoid mem leak
81 n.index = -1
82 *pq = old[:len(old)-1]
83 return n
84}
85func (pq *priorityQueue) update(n *nodeRecord, newF float64) {
86 n.fScore = newF
87 heap.Fix(pq, n.index)

Callers 1

findPathMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected