Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SPTree ¶
type SPTree []*Vertex
SPTree represents the shortest path tree
func Find ¶
Find builds the shortest path tree using Dijkstra algorithm. A greedy algorithm that gradually builds the shortest path tree
The runtime is O((|V|+|E|)*log|E|) where |V|log|E| accounts for heap.Fix whenever we check an out-going edge. And |E|log|E| accounts for heap.Pop to get the smallest cost vertex.
Click to show internal directories.
Click to hide internal directories.