Closed jszakmeister closed 11 years ago
I managed to whittle this down to a test case that fails to compute the correct components, but haven't gotten to the point where I understand what it broken just yet. Here's the test case:
(defn scc-is-busted [] (let [g (digraph [1 5] [2 4] [3 1] [3 2] [3 6] [4 10] [5 3] [6 1] [6 10] [7 8] [8 9] [8 11] [9 3] [9 5] [9 7] [10 2] [11 2] [11 4]) components (set (map set (scc g))) expected #{ #{2 4 10} #{1 3 5 6} #{11} #{7 8 9}}] (prn components) (if (not= expected components) (throw (RuntimeException. "scc did not compute the correct components")))))
There should be 4 strongly connected components, but scc is only returning 2, and they're wrong.
scc
This has been fixed with the pull request #7. Thanks!
I managed to whittle this down to a test case that fails to compute the correct components, but haven't gotten to the point where I understand what it broken just yet. Here's the test case:
There should be 4 strongly connected components, but
scc
is only returning 2, and they're wrong.