I'm trying to solve a subgraph isomorphism problem with networkx. I'm struggeling with the results of the .sugraph_is_isomorphic()...
A quick example:
import networkx as nx
G_1 = nx.Graph()
G_1.add_path([1,2,3])
G_1.add_path([1,3]) #wihout this line everything works like expected
G_2 = nx.Graph()
G_2.add_path([1,2,3])
GM = nx.isomorphisms.GraphMatcher(G1,G2)
print GM.subgraph_is_isomorphic()
It seems, when I'm adding this "loop" (it's an undirected Graph), the function returns False.
What is the problem here? Am I missing something?
Thanks
--
You received this message because you are subscribed to the Google Groups "networkx-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to networkx-discu...@googlegroups.com.
To post to this group, send email to networkx...@googlegroups.com.
Visit this group at http://groups.google.com/group/networkx-discuss.
For more options, visit https://groups.google.com/d/optout.
--
Well, the line_graph() turns edges into nodes and nodes into edges so an edge-induced subgraph becomes a node-induced subgraph of the line graph. If you want a length-2-path to be identified with a subgraph of a triangle then edge-induced subgraphs won't work for you either. What kind of subgraph do you want?
--
You received this message because you are subscribed to a topic in the Google Groups "networkx-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/networkx-discuss/bFErKN8pC_I/unsubscribe.
To unsubscribe from this group and all its topics, send an email to networkx-discu...@googlegroups.com.