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 -- View this message in context: http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/... Sent from the Main discussion list for the graph-tool project mailing list archive at Nabble.com.
On 04.02.2015 17:53, malwanain wrote:
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?
Yes, please look at the documentation: https://graph-tool.skewed.de/static/doc/topology.html#graph_tool.topology.is... You need to pass "isomap=True" to the function. -- Tiago de Paula Peixoto <tiago@skewed.de>
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 -- View this message in context: http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/... Sent from the Main discussion list for the graph-tool project mailing list archive at Nabble.com.
On 04.02.2015 18:39, malwanain wrote:
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]
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 -- Tiago de Paula Peixoto <tiago@skewed.de>
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. -- View this message in context: http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/... Sent from the Main discussion list for the graph-tool project mailing list archive at Nabble.com.
On 04.02.2015 21:37, malwanain wrote:
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 -- Tiago de Paula Peixoto <tiago@skewed.de>
participants (2)
-
malwanain -
Tiago de Paula Peixoto