FWIW, I have implemented the calculation of the Gomory-Hu tree in C as well; the implementation will be included in igraph 0.7 as igraph_gomory_hu_tree in the C layer and as Graph.gomory_hu_tree() in the Python interface. R interface is probably yet to come as well.
-- Tamas On 10 Jul 2013, at 13:54, Tamás Nepusz <[email protected]> wrote: > Hello, > > Attached is a quick implementation of the Gomory-Hu tree calculation in > Python. I haven't tested it too much (only with the example in Wikipedia), > but I think it should be okay. Let me know if you run into any issues; if > not, chances are that this will be converted into C at some point and then > merged into the next igraph release. > > All the best, > Tamas > > <gomory_hu.py> > > On 10 Jul 2013, at 11:45, Raphael C <[email protected]> wrote: > >> I am interested in the Gomory-Hu tree ( >> http://en.wikipedia.org/wiki/Gomory%E2%80%93Hu_tree ) of a graph. >> There are a few algorithms with the one by Gusfield apparently being >> very simple if you already have a max flow implementation. There is >> also source code here http://www.cs.princeton.edu/~kt/cut-tree/ . >> >> Would it be possible to add an implementation to python igraph by any >> chance please? I hope I haven't just missed it in the documentation. >> >> The full paper is at http://epubs.siam.org/doi/abs/10.1137/0219009 >> but seems to need a subscription unfortunately. >> >> Raphael >> >> _______________________________________________ >> igraph-help mailing list >> [email protected] >> https://lists.nongnu.org/mailman/listinfo/igraph-help > _______________________________________________ igraph-help mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/igraph-help
