Class GroupClosenessGrowShrink

Inheritance Relationships

Base Type

Class Documentation

class GroupClosenessGrowShrink : public NetworKit::Algorithm

Public Functions

GroupClosenessGrowShrink(const Graph &graph, const std::vector<node> &group, bool extended = false, count insertions = 0, count maxIterations = 100)
template<class Iter>
inline GroupClosenessGrowShrink(const Graph &G, Iter first, Iter last, bool extended = false, count insertions = 0, count maxIterations = 100)

Finds a group of nodes with high group closeness centrality. This is the Grow-Shrink algorithm presented in Angriman et al. “Local Search for Group Closeness Maximization on Big

Graphs” IEEE BigData 2019. The algorithm takes as input a graph and an arbitrary group of nodes, and improves the group closeness of the given group by performing vertex exchanges.

  • G – A connected undirected graph.

  • first – Iterator for first node of initial group of nodes.

  • last – Iterator for last node of initial group of nodes.

  • extended – Set this parameter to true for the Extended Grow-Shrink algorithm (i.e., vertex exchanges are not restricted to only neighbors of the group).

  • insertions – Number of consecutive node insertions and removal per iteration. Let this parameter to zero to use Diameter(G)/sqrt(k) nodes (where k is the size of the group).

  • maxIterations – Maximum number of iterations allowed.

~GroupClosenessGrowShrink() override
virtual void run() override

Runs the algorithm.

std::vector<node> groupMaxCloseness() const

Returns the computed group.

count numberOfIterations() const

Returns the total number of iterations performed by the algorithm.