isomorphic mapping

Hi

Given two graphs G1 and G2, when we check the isomorphism, the graph-tool
return True. Is there any command to show the mapping between these graphs?

Regards
M

Yes, please look at the documentation:

    https://graph-tool.skewed.de/static/doc/topology.html#graph_tool.topology.isomorphism

You need to pass "isomap=True" to the function.

Thanks for your answer. Now I've got the PropertyMap object. May I ask again,
if there are methods which return python dict? or print the map directly?
For example, what I need is something like this:
[A->B, C->D]

Regards

That is exactly what the property map gives you...

I have the impression you are completely ignoring the documentation.

Do you know how property maps work? Have you read the following part of
the quick start guide?

  https://graph-tool.skewed.de/static/doc/quickstart.html#property-maps

If the documentation is not clear, please say what the problem is.

Best,
Tiago

Sorry, If I found what you have written is clear why I should ask then. The
documentation seems written for advance people like you not for the typical
users. If you provide some simple examples specifically for graph
isomorphic, then every thing will be clear.

PS: as it is a public tool, you should expect lots of questions from
different levels of programming skills not just for advance people or you
should write JUST FOR ADVANCE LEVEL PROGRAMMERS.

Sorry, If I found what you have written is clear why I should ask then. The
documentation seems written for advance people like you not for the typical
users. If you provide some simple examples specifically for graph
isomorphic, then every thing will be clear.

Forgive my coarseness, but from your questions it is hard to understand
what is the nature of the difficulties you have. It is not a good idea
just to ask "how do I do X?" in the mailing list if "X" is covered in
the documentation. If you didn't understand the documentation, you
should make your questions more specific.

A good approach is to show a short tentative example code, around which
you can frame your question.

Regarding your actual problem, if you want to print the vertex mapping
you do simply:

    ret, isomap = isomorphism(g1, g2, isomap=True)
    for v in g1.vertices():
        print(isomap[v])

PS: as it is a public tool, you should expect lots of questions from
different levels of programming skills not just for advance people or you
should write JUST FOR ADVANCE LEVEL PROGRAMMERS.

That is fair enough, but if you need help (advanced or not) you should
also be prepared to explain your problem in detail. Asking one-line
questions about how to do this or that, specially when the task in
question is documented, is not going to elicit detailed responses.

Best,
Tiago