Asymmetric result in isomorphism function
Bug reports:
Please follow the general troubleshooting steps first:
-
Are you running the latest graph-tool
version? -
Do you observe the problem with the current git version? -
Are you using Macports or Homebrew? If yes, please submit an issue there instead: https://github.com/Homebrew/brew/issues and https://trac.macports.org/newticket -
Did you compile graph-tool
manually? -
If you answered yes above, did you use the exact same compiler to build graph-tool
,boost-python
andPython
?
I was working with the gt.topology.isomorphism function, and came across a bug, where isomorpism(g1, g2) would return False and isomorphism(g2, g1) returned True. This is the code:
real_graph = gt.collection.ns["lesmis"]
real_motifs, real_counts, real_locations = gt.clustering.motifs(real_graph, 3, return_maps = True)
test_motif = real_motifs[0]
loc = real_locations[0][0]
subgraph = gt.GraphView(real_graph, vfilt = lambda v: True if v in loc.a else False)
gt.topology.isomorphism(subgraph, test_motif) #returns True
gt.topology.isomorphism(test_motif, subgraph) #returns False
I am using graph-tool version 2.63
Thank you!