Class CombinedSCD

Inheritance Relationships

Base Type

Class Documentation

class CombinedSCD : public NetworKit::SelectiveCommunityDetector

Helper for combining two selective community detection algorithms.

This allows to combine two SCD algorithms such that first the first algorithm is executed on the given seed(s) and then the result of the first algorithm is used as the seed set of the second algorithm. This is particularly useful for seeding an algorithm with a clique.

Author

Michael Hamann michael.hamann@kit.edu

Public Functions

CombinedSCD(const Graph &g, SelectiveCommunityDetector &first, SelectiveCommunityDetector &second)

Initialize the combined algorithm with the given graph and the given two algorithms.

Parameters:
  • G – The graph to work on.

  • first – The first algorithm that is run with the given seed(s).

  • secodn – The second algorithm that is run with the result of the first algorithm.

virtual std::set<node> expandOneCommunity(node s) override

Expand a community with the given seed node using first and second algorithm.

Parameters:

s – The seed node to start with.

Returns:

The community found by the second algorithm.

virtual std::set<node> expandOneCommunity(const std::set<node> &s) override

Expand a community with the given seed nodes using first and second algorithm.

Parameters:

s – The seed nodes to start with.

Returns:

The community found by the second algorithm.

Protected Attributes

SelectiveCommunityDetector &first
SelectiveCommunityDetector &second