Class GroupClosenessLocalSwaps

Inheritance Relationships

Base Type

Class Documentation

class GroupClosenessLocalSwaps : public NetworKit::Algorithm

Public Functions

GroupClosenessLocalSwaps(const Graph &G, const std::vector<node> &group, count maxSwaps = 100)
template<class InputIt>
inline GroupClosenessLocalSwaps(const Graph &graph, InputIt first, InputIt last, count maxSwaps = 100)

Finds a group of nodes with high group closeness centrality. This is the LS-restrict 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.

Parameters:
  • G – A connected, undirected, and unweighted graph.

  • first, last – A range that contains the initial group of nodes.

  • maxSwaps – Maximum number of vertex exchanges allowed.

virtual void run() override

Runs the algorithm.

std::vector<node> groupMaxCloseness() const

Returns the computed group.

count numberOfSwaps() const

Returns the total number of vertex exchanges performed by the algorithm.