Hi, Thanks for the bug report, this has recently been fixed in the R interface:
https://bugs.launchpad.net/igraph/+bug/1032819 There was no new version since then so your best bet is probably to install one of the recent nightly snapshots of the R interface; for instance, this one: http://igraph.googlecode.com/files/igraph_nightly_0.6-2925-20120905.tar.gz You can install it with "R CMD INSTALL igraph_nightly_0.6-2925-20120905.tar.gz" from the command line. I think you will need the XCode Developer Tools (or any working C compiler) to compile it. -- T. On Wednesday, 5 September 2012 at 15:34, Christopher Knight wrote: > Hi, > I'm trying to use graph.count.subisomorphisms.vf2() and > graph.get.subisomorphisms.vf2() in R on graphs with coloured edges. However, > this doesn't behave as I expect. This could be a bug, or it's possible I've > misunderstood something fundamental about what these functions are meant to > do. Specifically: > > #create a directed ring graph with alternating edge colours > library(igraph) > g1 <- graph.ring(10,directed=TRUE) > E(g1)$color <- rep(1:2, length=ecount(g1)) > #create a simple A-->B-->C graph with two edge colours > g2<-graph.edgelist(el=matrix(c(1,2,2,3),nrow=2,byrow=TRUE),directed=TRUE) > E(g2)$color<-c(1,2) > > > #count isomorphisms ignoring colours > graph.count.subisomorphisms.vf2(g1, g2, edge.color1=NULL, edge.color2=NULL) > > #10 as expected > #count isomorphisms using colours > graph.count.subisomorphisms.vf2(g1, g2) > > > #6 - I expected 5 (one for each occurrence of a colour in g1) and what these > are when looked at with graph.get.subisomorphisms.vf2(g1, g2) seems > inexplicable to me. > #change colours for subgraph edges to the same value, a sequence which > doesn't occur in g1 at all, and count isomorphisms again > E(g2)$color<-c(1,1) > graph.count.subisomorphisms.vf2(g1, g2) > > #expect a change to zero, but get 6 again > > Any help much appreciated. > > thanks, > > Chris > > sessionInfo() > R version 2.15.1 (2012-06-22) > Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit) > > locale: > [1] en_GB.UTF-8/en_GB.UTF-8/en_GB.UTF-8/C/en_GB.UTF-8/en_GB.UTF-8 > > attached base packages: > [1] stats graphics grDevices utils datasets methods base > > other attached packages: > [1] igraph_0.6-2 > > > ------------------------------------------------------------------------ > Dr Christopher Knight Michael Smith Building > Wellcome Trust RCD Fellow Faculty of Life Sciences > Tel: +44 (0)161 2755378 The University of Manchester > room B.2012 Oxford Road > tinyurl.com/knightLab/ (http://tinyurl.com/knightLab/) Manchester M13 9PT > · . ,,><(((°> UK > ------------------------------------------------------------------------ > > > _______________________________________________ > igraph-help mailing list > [email protected] (mailto:[email protected]) > https://lists.nongnu.org/mailman/listinfo/igraph-help _______________________________________________ igraph-help mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/igraph-help
