MCPcopy Create free account
hub / github.com/TheAlgorithms/Go / Less

Method Less

graph/prim.go:15–15  ·  view source on GitHub ↗
(i, j int)

Source from the content-addressed store, hash-verified

13
14func (h minEdge) Len() int { return len(h) }
15func (h minEdge) Less(i, j int) bool { return h[i].Weight < h[j].Weight }
16func (h minEdge) Swap(i, j int) { h[i], h[j] = h[j], h[i] }
17
18func (h *minEdge) Push(x interface{}) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected