Skip to content

Feature/plm with custom initialization - #784

Open
jukaradayi wants to merge 4 commits into
networkit:masterfrom
jukaradayi:feature/PLM-with-custom-initialization
Open

Feature/plm with custom initialization#784
jukaradayi wants to merge 4 commits into
networkit:masterfrom
jukaradayi:feature/PLM-with-custom-initialization

Conversation

@jukaradayi

Copy link
Copy Markdown

This is a suggestion to add a partition as an optional parameter for the PLM algorithm. This partition can then be used to initialize the PLM.
This is particularly useful (in my case) when dealing with dynamic graphs, to check the influence of new links on current communities.

The PLM run can still be called without a partition and would run as usual; the CI is unaffected.

Comment thread networkit/cpp/community/PLM.cpp
*
*/
PLM(const Graph& G, bool refine=false, double gamma = 1.0, std::string par="balanced", count maxIter=32, bool turbo = true, bool recurse = true);
PLM(const Graph& G, bool refine=false, double gamma = 1.0, std::string par="balanced", count maxIter=32, bool turbo = true, bool recurse = true, Partition zeta=Partition(0));

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding an initial partition looks like a good idea. However, the parameter list is already quite long and setting the partition this way seems inconvenient. What about adding a setInitialPartition method? This method could also be overloaded to also take an rvalue ref, so that we can avoid unnecessary copies.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants