Admin message

Please use the issue tracker only to report bugs (i.e. errors in the library that need to be fixed) or feature requests.

Please check if the current git version also has the same problem. An easy way to do this is to use google colab!

For questions about how to compile, install or use the library, please use instead the web forum at https://forum.skewed.de/c/graph-tool.


(If unsure, use the forum first.)


IMPORTANT: When opening new issues, please fill out the required information listed in the issue template!

Subgraph isomorphism can't find a trivial isomorphism if the filtering GraphViews are used

Subgraph isomorphism can't find a trivial isomorphism if the filtering GraphViews are used.

The code below creates two one-vertex views of the same graph, using the same filter. subgraph_isomorphism can't see the similarity.

from graph_tool import Graph, GraphView
from graph_tool.topology import subgraph_isomorphism
g=Graph(directed=True)
v1=g.add_vertex()
v2=g.add_vertex()
v3=g.add_vertex()
g.add_edge(v1,v2)
g.add_edge(v2,v3)

flt=lambda x:x!=1   # <---- This doesn't work, but the line below does.
# flt=lambda x:True 
a=GraphView(g,vfilt=flt)
b=GraphView(g,vfilt=flt)
print(subgraph_isomorphism(a,b))
print('Graph_tool version', graph_tool.__version__)

outputs

[]
Graph_tool version 2.43 (commit , )

A possibly related issue is #2 (closed)

Edited Sep 08, 2021 by Sergey M
Assignee Loading
Time tracking Loading