|
From: | Gábor Csárdi |
Subject: | Re: [igraph] R igraph: why do get.isomorphism functions use the index 0 in mappings? |
Date: | Thu, 2 May 2013 18:56:13 -0400 |
Hello,I am quite new to igraph, so please be gentle :-)I'm using the R interface, but I also looked at the C interface. If I got it right, in the C interface vertex indices start from 0, while in R they start from 1 (that's good and natural for R).However, the get.isomorphism functions return zeros in the mappings, e.g.> g1=graph.edgelist(cbind(c(1,2,3,4),c(2,3,4,1)))> g2=graph.edgelist(cbind(c(2,4,1,3),c(4,1,3,2)))> graph.get.isomorphisms.vf2(g1,g2)[[1]][1] 0 2 1 3[[2]][1] 1 3 2 0[[3]][1] 2 0 3 1
[[4]][1] 3 1 0 2This seems inconsistent with the 1-based indexing of R.Also, some other functions return maps which don't use 0:> graph.isomorphic.vf2(g1,g2)$iso[1] TRUE$map12[1] 1 3 2 4$map21[1] 1 3 2 4Is this by design, or is it an oversight?Szabolcs
_______________________________________________
igraph-help mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/igraph-help
[Prev in Thread] | Current Thread | [Next in Thread] |