You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
var g = new jsgraphs.WeightedGraph(2);
g.addEdge(new jsgraphs.Edge(0, 1, 5.0));
var dijkstra = new jsgraphs.Dijkstra(g, 0);
var has0To1 = idijkstra.hasPathTo(1); // True.. as expected
dijkstra1 = new jsgraphs.Dijkstra(g, 1);
var has1To0 = idijkstra.hasPathTo(0); //It is returning false. But it should return true as the graph is a Undirected graph
The text was updated successfully, but these errors were encountered:
I can not reproduce your problem. For me the hasPathTo function returns true in both cases. Though I had to change your 4th line of code (and in the code block), as it says idijkstra, instead of dijkstra (as declared).
var g = new jsgraphs.WeightedGraph(2);
g.addEdge(new jsgraphs.Edge(0, 1, 5.0));
var dijkstra = new jsgraphs.Dijkstra(g, 0);
var has0To1 = idijkstra.hasPathTo(1); // True.. as expected
The text was updated successfully, but these errors were encountered: