Dijkstra's algorithm to find all the shortest paths possible
问题 I'm working on Dijkstra's algorithm, and I really need to find all the possible shortest paths, not just one. I'm using an adjacency matrix and I applied Dijkstra's algorithm, and I can find the shortest path. But I need to find all the paths with that minimum cost, I mean all the possible solutions, if they exist. This is how my algorithm works, for a single solution: public void dijkstra( int graph[][] ) { int d[] = new int[ graph.length ]; int dC[] = new int[ graph.length ]; int p[] = new