vtraag / leidenalg

Implementation of the Leiden algorithm for various quality functions to be used with igraph in Python.
GNU General Public License v3.0
575 stars 77 forks source link

Changed node sizes to floats. #115

Closed vtraag closed 1 year ago

vtraag commented 1 year ago

This fixes the request by @arnaudon in https://github.com/vtraag/leidenalg/pull/109#issuecomment-1284984882 by changing node_size to a double instead of size_t.

This also required some changes in some contructors, because they could no longer be discerned on the basis of their call signature.

vtraag commented 1 year ago

@arnaudon, perhaps you can take the code in this branch / PR, and try to see if it does what you would like it to do?

arnaudon commented 1 year ago

Ok, I worked out how to use this in our settings, I need directed graph and self_loops_corrected, which I force to be True upon igraph graph construction. So if you can just fix the little double thing, it should be good to merge for me! Thank you!

arnaudon commented 1 year ago

Hello @vtraag , did you have a chance to look at that more closely? Thanks! We have a small code paper almost ready which is mostly waiting on this PR to be merged, so we can do our final tests, etc...

vtraag commented 1 year ago

Hi @arnaudon, apologies for taking some more time. The way that the correction for the self loops is made triggered some longer thinking about the design. For now, I've decided to go with the easy decision and just leave it all as is, which is working properly. If now everything works correctly for you, I'm happy to merge this as is, and make a new release.

arnaudon commented 1 year ago

No problem, better to do it properly! I saw you moved a few things around, thanks for the work on that, and sorry it triggered some extra thinking! I just tested it and it works, so you can merge and release when you want! Thank you again!

vtraag commented 1 year ago

@arnaudon, I've now merged this PR, and a new version is about to be released. Once the checks all pass on the master branch, the new version 0.9.1 should automatically be released to PyPI (followed by conda updates shortly afterwards).

arnaudon commented 1 year ago

Great, thanks a lot! Yes I can see 0.9.1 on pypi now! Have a nice day a nice xmas break!