Finding the shortest path between nodes in a graph
By using a weighted adjacency matrix such as:
5 => number of vertices
0 6 1 3 0
6 0 2 4 1
1 2 4 1 0
3 4 1 0 9
0 1 0 9 0
0 3 => source and target
We can draw a graph with 5 vertices and draw the shortest path between vertex 0 and vertex 3.
Below is an example graph using the same adjacency matrix, the shortest path in green:
Please enter any adjacency matrix in the "graph.txt" file
Run DijkstraAlgorithm.java to output the graph