Repository navigation
BUG: fixed the if condition in asadpour_atsp - #7753
Conversation
rossbar
left a comment
There was a problem hiding this comment.
Seems pretty straightforward :) - let's add the regression test as well. Thanks @Schefflera-Arboricola !
mjschwenne
left a comment
There was a problem hiding this comment.
This looks good to me as well, a simple off by one error.
I agree with Ross about the regression test though.
|
Adding a regression test shows that the current code doesn't work for 2 nodes (tries to take the @mjschwenne can you check that this 2-node code is correct? |
|
Nice catch! In this case we can simply brute force the TSP since there is only one possible path. Our only choice is which one of the two nodes should be returned first, and I think your new check handles that quite well. Everything here makes sense to me. |
fixes #7752