Skip to content
New issue

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

Hi! Does the input support an input with an irrational side length? #6

Open
provenpeng opened this issue Jun 3, 2020 · 2 comments
Open
Labels

Comments

@provenpeng
Copy link

If my input is a right triangle, the hypotenuse is 2, and one of the right angles is 1, does that support the input, and if so, how?If not, any Suggestions?

@supermitch
Copy link
Owner

At the moment it seems all the code that uses weight or edge_cost assumes a float value. So if you wanted to use a lambda as an input, for example, that would require quite a lot of refactoring. I can imagine it would be possible, however. You could define an edge as a function, e.g. math.pi(), and call that function whenever you are evaluating your edge cost.

You might want to define your input data in a python file, in that case.

@provenpeng
Copy link
Author

Thank you for answering. There is another question I would like to ask you. If you are only seeking the shortest path through all the edges without asking for the final return to the starting point, how should you achieve it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants