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
Is it possible to get the shortest path without having to return to the first point?
One where the last point is the furthest away so the salesman doesn't have to return all the way back to the starting point?
The text was updated successfully, but these errors were encountered:
Hello ! No, it's not possible with the current implementation.
Sorry, something went wrong.
Does the following not acheive something similar?
Path.prototype.randomPos = function () { if (this.roundTrip) { return 1 + Math.floor(Math.random() * (this.points.length - 1)); } else { return Math.floor(Math.random() * this.points.length); } };
I don't think so. But if you open a clean pull request with good code and tests, I'll merge it 🙂
No branches or pull requests
Is it possible to get the shortest path without having to return to the first point?
One where the last point is the furthest away so the salesman doesn't have to return all the way back to the starting point?
The text was updated successfully, but these errors were encountered: