I am sorry, but I don't know what exactly is the problem. What's wrong
with this:
library(igraph)
kar <- nexus.get("karate")
star3 <- graph.formula(A -- B:C:D)
subiso <- graph.get.subisomorphisms.vf2(kar, star3)
Then you can query the symbolic ids:
V(kar)$name[ subiso[[1]]+1 ] # This is actual
Thanks,
but the problem is that igraph doesn't even give the correct id mappings.
it only gives the mapping of the structure(without labels)
For above eg:
igraph only sees the one edge structure(of graph 2) without labels or names
and gives all possible edges in the main graph(1) to be isomorphic
Hi,
igraph will give you the mappings via vertex ids. If you want to use
symbolic vertex names, then attach a vertex attribute called 'name'.
Then any vector of numeric vertex ids (v, from graph g) can be
converted to vertex names via
V(g)$name[v]
or the more readable equivalent
get.vertex.attr
Hi all,
I want to find all the mappings of one graph in another graph, based on
their vertex labels
Is there any way to do this in igraph based on vertex labels.
(as far as i know Igraph allows the subgraph isomorphism based only on
vertex and edge colors)
Eg:
graph 1:
x(1) x(2)
x(2) y(3)
y(4) x(1
4 matches
Mail list logo