How to create a weighted graph and evaluate all the shortest path
Sorry to ask this question but I cannot see how to start. I have a graph with say 3 vertex ${1, 2, 3, 4}$. The weights are :
1-2 : 6
1-3 : 2
1-4 : 2
2-3 : 1
2-4 : 5
3-4 : 3
I would like to know how to create such a simple graph in such a way to be able to evaluate the shortest path between any pair of two vertices. I have found how to do that for simple graphs not for weighted.