{"action":"closed","issue":{"url":"https://api.github.com/repos/timothypratley/munkres/issues/5","repository_url":"https://api.github.com/repos/timothypratley/munkres","labels_url":"https://api.github.com/repos/timothypratley/munkres/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/timothypratley/munkres/issues/5/comments","events_url":"https://api.github.com/repos/timothypratley/munkres/issues/5/events","html_url":"https://github.com/timothypratley/munkres/issues/5","id":278746257,"number":5,"title":"Infinite loop on certain inputs","user":{"login":"aiba","id":26651,"avatar_url":"https://avatars2.githubusercontent.com/u/26651?v=4","gravatar_id":"","url":"https://api.github.com/users/aiba","html_url":"https://github.com/aiba","followers_url":"https://api.github.com/users/aiba/followers","following_url":"https://api.github.com/users/aiba/following{/other_user}","gists_url":"https://api.github.com/users/aiba/gists{/gist_id}","starred_url":"https://api.github.com/users/aiba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aiba/subscriptions","organizations_url":"https://api.github.com/users/aiba/orgs","repos_url":"https://api.github.com/users/aiba/repos","events_url":"https://api.github.com/users/aiba/events{/privacy}","received_events_url":"https://api.github.com/users/aiba/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2017-12-03T05:24:12Z","updated_at":"2017-12-03T20:53:28Z","closed_at":"2017-12-03T20:53:28Z","author_association":"CONTRIBUTOR","body":"`munkres/minimize-weight` seems to hit an infinite loop on the following input.\r\n\r\n```clj\r\n(def data\r\n  [[75152.16 79641.735 79816.84000000001\r\n    80136.4100000001 87019.64000000007 93109.72 109210.77200000006\r\n    111735.02900000008 112814.97999999992 117877.14200000005 120774.21500000004\r\n    124174.37499999999 126795.98 133209.9759999998 155223.27800000008\r\n    158271.3189999998 174048.19139999987 174524.84499999986 177995.27399999998\r\n    193350.9690000001 196368.0950000001 228067.74650000012 244482.8307000004\r\n    245169.75620000024 256820.01349999986 298628.8729999993 333048.0404999997]\r\n   [45844.029999999984 65922.10999999993\r\n    71459.125 73218.12999999995 75252.81999999999 76037.58499999999\r\n    77553.08000000005 80057.86999999994 81400.48999999998 82949.50500000002\r\n    86137.78499999996 86765.12499999999 92750.70499999994 93943.25500000002\r\n    102377.82000000005 118454.66500000002 122760.0509999999 131769.749\r\n    132993.62900000016 133541.91 137481.78000000003 143030.455 155900.04799999972\r\n    166807.519 183102.82200000013 185771.57000000007 187268.5659999999\r\n    202959.76099999977 216737.1260000001 217640.96199999985 221026.77900000016]])\r\n\r\n(let [[as bs] data]\r\n  (munkres/minimize-weight #(Math/abs ^double (- %1 %2))\r\n                           as bs))\r\n```\r\n\r\nIs there some assumption about the input data that I am perhaps violating?  I noticed that in `jstack`, it's stuck at:\r\n\r\n```\r\n        at DenseDijkstraSP.<init>(DenseDijkstraSP.java:36)\r\n        at AssignmentProblemDense.augment(AssignmentProblemDense.java:68)\r\n        at AssignmentProblemDense.<init>(AssignmentProblemDense.java:43)\r\n        at munkres$minimize_weight.invokeStatic(munkres.clj:42)\r\n        at munkres$minimize_weight.invoke(munkres.clj:34)\r\n```\r\n\r\nAnd the javadoc for DenseDijkstraSP says \"No parallel edges\".  Could I be passing in a parallel edge, and if so, how do I avoid that?"}}
{"actor":{"display_login":"timothypratley"}}