> |
# More complex network, show resulting graph
net := [
[9,36,1], # 9 nodes, 36 arcs, source node 1
[1,2,5], # arc from 1 to 2, cost 5
[1,3,9],[1,4,20],[1,5,4],[1,8,14],[1,9,15],
[2,1,5],[2,3,6],[3,1,9],[3,2,6],[3,4,15],
[3,5,10],[4,1,20],[4,3,15],[4,5,20],[4,6,7],
[4,7,12],[5,1,4],[5,3,10],[5,4,20],[5,6,3],
[5,7,5],[5,8,13],[5,9,6],[6,4,7],[6,5,3],
[7,4,12],[7,5,5],[7,8,7],[8,1,14],[8,5,13],
[8,7,7],[8,9,5],[9,1,15],[9,5,6],[9,8,5]
]:
Dijkstras_Algorithm(net, true); |