[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[igraph] Graph Equality in Python
From: |
Robin Müller-Bady |
Subject: |
[igraph] Graph Equality in Python |
Date: |
Sun, 14 Dec 2014 14:54:44 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.2.0 |
Dear all,
I'm currently looking for a method in the igraph Python implementation
that provides checking for graph equality of two graph, e.g. something like
>>> g1 = Graph(3, directed=False)
>>> g1.add_edges([(0,1), (1,2)])
>>> g2 = Graph(3, directed=False)
>>> g2.add_edges([(1,2), (0,1)])
>>> g1.equals(g2)
True
I know that there is a "g1.isomorphic(g2)" function, but isomorphism is
not necessarily equality, e.g.:
>>> g3 = Graph(3, directed=False)
>>> g3.add_edges([(0,1), (0,2)])
>>> g3.equals(g2)
False
>>> g3.isomorphic(g2)
True
Is there anything like that?
I'm (more or less) new to python, in case I was missing something I am
very sorry in advance.
Best regards,
Robin
- [igraph] Graph Equality in Python,
Robin Müller-Bady <=