7QiF9pQ1oe3J5KgTEKwDII changeset
| Changeset | 323637636337 (b) |
|---|---|
| Parent | 393735356538 (a) |
| a | b | ||
|---|---|---|---|
| 5 | 5 | connected (keep-indexed ; return the nodes connected to the root, and their index | |
| 6 | 6 | #(let [conn (connected? r %2)] | |
| 7 | 7 | (if conn [conn %1])) g) | |
| ... | |||
| 8 | - | candidates (map (fn [[n i]] [(concat (take (dec i) g) (drop i g)) n]) connected)] | |
| 8 | + | candidates (map (fn [[n i]] [(concat (take (dec i) g) (drop i g)) n]) connected)] ; candidates are "new" root nodes, and the remaining graphs | |
| ... | |||
| 9 | 9 | (or (empty? g) | |
| 10 | 10 | (and (not (empty? connected)) | |
| 11 | 11 | (some boolean (map #(apply tour? %) candidates))))))) | |
| ... | |||
|
|