Can new functions of modularity be added to leidenalg
mbdjalal opened this issue · 3 comments
Hello,
I want to use other functions measuring modularity. These functions are new and does not exists in leidenalg.
How can I add theses functions, please ? Do I need the source of the .so file used by leidenalg ?
Thanks
In principle this is not too difficult, but you would need to do this in C++. You can read more about it here: https://leidenalg.readthedocs.io/en/stable/implement.html.
However, I've recently externalised the C++ core to a separate library, which is available from https://github.com/vtraag/libleidenalg. If you want to contribute another quality function, you should hence first add the function there. In principle, the main instructions at https://leidenalg.readthedocs.io/en/stable/implement.html remain the same, but you should now apply them in the libleidenalg
repository when they concern the C++ part.
If you want to start doing this, I would recommend to first get the libleidenalg
to work separately on your computer. Once you have set that up, you can try to add a new quality function. If you want, you can then open a draft PR on the libleidenalg
repo with your preliminary changes to discuss further.
I'll leave this open until I've fully updated the documentation about how to contribute new quality functions.
I've now update the documentation, and should be available (shortly) on https://leidenalg.readthedocs.io/en/latest/implement.html. It essentially just separates the parts of how to contribute to C++ and Python in the two different repositories. I'll now close this issue.