Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option for unique contiguous numbering of vertices #3

Open
ko-phy opened this issue Dec 12, 2020 · 0 comments
Open

Add option for unique contiguous numbering of vertices #3

ko-phy opened this issue Dec 12, 2020 · 0 comments

Comments

@ko-phy
Copy link

ko-phy commented Dec 12, 2020

The way the output is returned currently is well suited for LDPC codes, but suppose I just want to generate bipartite graphs, without a constraint / variable association. For this all vertices should be labelled uniquely. This would also be compatible with how graph libraries like igraph or networkx read graph data.

So if we have N vertices in the "left" part and M vertices in the "right" part, label indices should be unique integers in the range 0,...,M+N-1, where the first N correspond to "left" and the next M correspond to "right".

Even if one "forgets" that "left" / "right" vertex indices come first / last, the bipartition can be recovered in linear time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant