Ask Your Question

Revision history [back]

Looking at the source code of the method (see G.kirchhoff_symanzik_polynomial??), you see that the following dictionary is used to map integers to edges:

edge2int = {e: j for j, e in enumerate(edges)}

Hence, you can get the correspondence integer -> edges by just typing:

sage: {j: e for j, e in enumerate(G.edges())}

Note however that this behaviour is read from the current source code, but it is not specified in the documentation, so while it is the case now, it might change in the future without warning, so be careful (or request an explicit specification).