munkres-cpp icon indicating copy to clipboard operation
munkres-cpp copied to clipboard

Method Munkres::pair_in_list always return false

Open Gluttton opened this issue 11 years ago • 2 comments

Method Munkres::pair_in_list always return false.

I have launched tests with option --gtest_repeat=100 and built test coverage report (using lcov). Based report I found that method Munkres::pair_in_list always return false. I have no idea about is this bug or no, but it's looks suspicious. If this method redundant it can be removed, else test case for it must be found.

I have no idea how attach report in issue, so I just attach screenshot.

munkres1 munkres2

Gluttton avatar Dec 07 '13 20:12 Gluttton

I'm not sure - it's been a long while since I wrote that, and I can't find the references I used when I did. I'm thinking that there are some cases where it happens. I agree that some examples of this finding a position of a star or prime that's already been added to the star/prime sequence in a prior pass (the case where pair_in_list would return true) would be helpful.

saebyn avatar Dec 07 '13 21:12 saebyn

I have checked that if feed to the stage4 matrix which contain loop of STAR and PRIME signs, the function Munkres::pair_in_list will be called. But now is another question how to prove that matrix with loops of STAR and PRIME signs never can be passed into stage4?

Note: matrix with loops of STAR and PRIME signs looks like: S - P - - - - - P - S - - - - -

Gluttton avatar Sep 20 '14 17:09 Gluttton