Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Dijkstra ¶
Dijkstra finds shortest paths from given nodes to the others in the graph Graph is represented like this: - index of array `graph` is an index of the node - each value of array `graph` is an array of neighbours of the node (index of the node is an index of `graph` array, remember?) - each neighbour is represented by 2-element array where 0-th element - index of neighbour node, 1-st element - weight of the edge to that neighbour
returns array of path lengths from given node with index `start` to any other node
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.