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

nk.Partition.numberOfSubsets() returns 1 for constructed, uncompacted nk.Partitions #1033

Open
daxelb opened this issue Feb 16, 2023 · 1 comment
Assignees

Comments

@daxelb
Copy link

daxelb commented Feb 16, 2023

Fix:
First run nk.Partition.compact() on the object before trying to returning.

@fabratu fabratu self-assigned this Feb 17, 2023
@fabratu
Copy link
Member

fabratu commented Feb 17, 2023

Hi, thanks for reporting the issue.

Another fix would be to move all members of the partition to a singleton partition:

G = nk.readGraph("./uk.edgelist", nk.Format.EdgeListSpaceZero)
partition = nk.Partition(G.numberOfNodes())
partition.allToSingletons()

We will add some proper initialization / documentation for a self constructed partition.

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

No branches or pull requests

2 participants