igraph-help
[Top][All Lists]
 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 BuildingWellcome Trust RCD Fellow Faculty of Life SciencesTel: +44 (0)161 2755378 The University of Manchesterroom B.2012 Oxford Roadtinyurl.com/knightLab/ Manchester M13 9PT· . ,,><(((°> UK------------------------------------------------------------------------`