All paths in a graph between 2 nodes after implementing Dijkstra
<p>I am working on a huge optical networks project where the networks are represented as undirected graphs where cycles may exist. At some point i want to find all minimum hop paths between two nodes in the graph that represent an arbitrary optical connection. I successfully implemented Djikstra with weight 1 to all edges to find minimum hop paths instead of minimum weights and modified the relaxation step to save all parents of a node instead of one (added code to save when distance is equal instead of just smaller). So now in the example network below i have going from node 0 to node 4: node 1 has parent 0, node 2 has parent 0, node 3 has parents 1,2 and node 4 has parent 3. Each node combination is an object cell in a 2d array and one of many attributes of each cell is a list of its parents (that is, a search for a parent in cell 0,3 gives the parent(s) of 3 when going from 0 to 3) </p>

<pre><code>0 ---- 1
|      |
2 ---- 3 --- 4
</code></pre>

<p>Now I'm stuck. I want to save in a way all minimum hop paths from all sources to all destinations in the graph so i can provide minimum hop paths to any possible arbitrary connection. Can you please recommend a solution to this? I'm working on it for days and I'm truly stuck.
Thank you in advance.</p>
