title: Find all shortest paths between two nodes in a graph without adding weight attributes
body: <p>Given a directed graph <em><strong>G</strong></em>, source node <em><strong>s</strong></em>, target node <em><strong>t</strong></em> and a weight function <em><strong>f</strong></em>.
  Is it possible to calculate all shortest paths between s-t using networkx without adding the weights as edge attributes?</p>
  <p>For a single shortest path I am using <a href="https://testfixsphinx.readthedocs.io/en/latest/reference/generated/networkx.algorithms.shortest_paths.weighted.single_source_dijkstra.html" rel="nofollow noreferrer">single_source_dijkstra</a></p>
  <pre><code>shortest_path = nx.single_source_dijkstra(G, source=s, target=t, weight=f)
  </code></pre>
  <p>I know that if I would add the weights as edge attributes, I could use <a href="https://networkx.org/documentation/stable/reference/algorithms/generated/networkx.algorithms.shortest_paths.generic.all_shortest_paths.html#networkx.algorithms.shortest_paths.generic.all_shortest_paths" rel="nofollow noreferrer">all_shortest_paths</a></p>
  <pre><code>all_shortest_paths = nx.all_shortest_paths(G, source=s, target=t, weight='weight', method='dijkstra')
  </code></pre>
  <p>Is there a similar way of computing all shortest paths, where I don't have to add weight attributes to every edge and instead input a weight function f and get a list of (path_length, path)-tuples?</p>