We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When you are trying to build all paths for a connected graph you end up in an infinite loop in Graph.js line 113.
Example:
Graph = require('node-all-paths'); const route = new Graph(); route.addNode('A', { B:2, C:3, D:4 }); route.addNode('B', { A:2, C:4, D:5 }); route.addNode('C', { A:3, B:4, D:6 }); route.addNode('D', { A:4, B:5, C:6 }); var possible_routes = route.path('A', 'D', { cost:true });
A redesign of the findAll function in Graph.js would fix the issue.
findAll
The text was updated successfully, but these errors were encountered:
He's right. The current algorithm results in an infinite loop for cyclic graphs.
Sorry, something went wrong.
filte closed path that may cause infinite loop and add a optional var…
ecfa334
…iable depth to limit max depth search path in a graph
It's now 1 December 2018, and I am still getting this error, so I am guessing this is not fixed as stated.
I have just 13 entries, with varying values, and I either get RangeError: Maximum call stack size exceeded or it crashes my debugger in vscode.
Is this project supported, should I be looking for a different module to do this, do you have any recommendations?
No branches or pull requests
When you are trying to build all paths for a connected graph you end up in an infinite loop in Graph.js line 113.
Example:
A redesign of the
findAll
function in Graph.js would fix the issue.The text was updated successfully, but these errors were encountered: