I have the situation shown below where there is a weighted graph.
I am trying to get the best path from A to D based on a custom function, the total cost is the product of the previous costs.
- A - B - D = 0.6 * 30 = 18
- A - C - D = 0.3 * 40 = 12
I want to choose the second path (lower cost).
How can I do this using the networkx library?
thank you
