开发者

Implementation of Johnson's algorithm to find elementary circuits (cycles) in a graph

Does anyone have source code implementing this algorithm for finding cycles, preferably in a mo开发者_运维知识库dern statically-typed language like SML, OCaml, Haskell, F#, Scala?


The following is a Java implementation of the algorithm you need: https://github.com/1123/johnson. Java running on the JVM, you can also use it from Scala.


I struggled on this too, I came up with this page that lists some implementations for Johnson algorithm (the one looking for elementary circuits) in Java and OCaml. The author of the blog post fixed some issues in the original implementations, on the same page I linked before there are also the fixed versions of both implementations.


You can find it here as part of jgrapht implementation.


Will C++ and Boost Graph Library work for you?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜