Actually, the graph would do, I don't really need the code that generates it.
Anyway, it seems that this is a bug in igraph, it does not handle edges with zero weights. A workaround is to replace zero weights with something small: E(g)$weight <- ifelse(E(g)$weight == 0, 1e-10, E(g)$weight) and the output seems to make more sense. I created a bug report for this: https://github.com/igraph/igraph/issues/628 Gabor On Tue, Jun 3, 2014 at 10:31 PM, Tom Wright <[email protected]> wrote: > Hi Gábor, > > Thank you for taking a look at this. > I've posted an example: http://pastebin.com/aUi9vkyk > > > > On Tue, 2014-06-03 at 21:58 +0200, Gábor Csárdi wrote: > > Please provide a reproducible example. > > See > http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example > > > > > > Thanks, Gabor > > > > > > On Tue, Jun 3, 2014 at 7:02 PM, Tom Wright <[email protected]> wrote: > > Hi, > > This is probably a gap in my knowledge but can someone please > > help me > > understand the output I am getting from the stMincuts > > function? > > > > With the example attached I don't understand why cut$cuts[[1]] > > is empty. > > > > The graph I am using is pictured in the attachment, all edges > > to > > vertices s & t have value 1, all other edges have value 1000. > > > > Thanks, > > Tom > > > > > cut<-stMincuts(g,'s','t') > > > cut > > $value > > [1] 5 > > > > $cuts > > $cuts[[1]] > > numeric(0) > > > > $cuts[[2]] > > [1] 89 90 91 92 93 94 95 96 97 98 99 100 101 102 > > 103 > > > > > > $partition1s > > $partition1s[[1]] > > [1] 30 24 18 12 6 > > > > $partition1s[[2]] > > [1] 30 24 18 12 6 31 29 28 27 26 25 23 22 21 20 19 17 16 15 > > 14 13 11 > > 10 9 8 7 5 4 3 2 1 > > > > _______________________________________________ > > 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 > > > > _______________________________________________ > 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
