Closed skeletorkun closed 4 years ago
https://www.npmjs.com/package/graph-data-structure#shortest-path
example :
let shortestPath = graph.shortestPath(departure, arrival); console.log("shortest path " + JSON.stringify(shortestPath));
Expected behavior:
The returned array also contains a weight property, which is the total weight over all edges in the path
Actual behavior: shortest path ["Hoth","Endor"]
shortest path ["Hoth","Endor"]
Nevermind. it does actually.
let shortestPath = graph.shortestPath(departure, arrival); console.log("shortest path total weight " + shortestPath.weight);
Thanks for reporting your experience!
https://www.npmjs.com/package/graph-data-structure#shortest-path
example :
Expected behavior:
Actual behavior:
shortest path ["Hoth","Endor"]