Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

answered 3 years ago

Max Alekseyev gravatar image

It's unclear what do you mean under "distinguish". If it's about creation/generation of unlabeled graphs, then both Graph or DiGraph produce unlabeled (di)graphs unless one specifies labels for vertices and/or edges. If it's about comparison of unlabeled graphs, then this can be done via comparison of their canonical labels (`.canonical_label()'). So, example of what you want to achieve would be helpful.

click to hide/show revision 2
No.2 Revision

It's unclear what do you mean under "distinguish". If it's about creation/generation of unlabeled graphs, then both Graph or DiGraph produce unlabeled (di)graphs unless one specifies labels for vertices and/or edges. If it's about comparison of unlabeled graphs, then this can be done via comparison of their canonical labels (`.canonical_label()'). (.canonical_label()). So, example of what you want to achieve would be helpful.

click to hide/show revision 3
No.3 Revision

It's unclear what do you mean under "distinguish". If it's about creation/generation of unlabeled graphs, then both Graph or DiGraphmany graph construction methods produce unlabeled (di)graphs unless one specifies labels for vertices and/or edges. (di)graphs. If it's about comparison of unlabeled graphs, then this can be done via comparison of their canonical labels (.canonical_label()). So, example of what you want to achieve would be helpful.