Chinese-Postman
Chinese-Postman copied to clipboard
Hi! Does the input support an input with an irrational side length?
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?
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.
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?