Class GroupCloseness

Inheritance Relationships

Base Type

Class Documentation

class GroupCloseness : public NetworKit::Algorithm

Public Functions

GroupCloseness(const Graph &G, count k = 1, count H = 0)

Finds the group of nodes with highest (group) closeness centrality. The algorithm is the one proposed in Bergamini et al., ALENEX 2018 and finds a solution that is a (1-1/e)-approximation of the optimum. The worst-case running time of this approach is quadratic, but usually much faster in practice.

  • G – An unweighted graph.

  • k – Size of the group of nodes

  • H – If equal 0, simply runs the algorithm proposed in Bergamini et al.. If > 0, interrupts all BFSs after H iterations (suggested for very large networks). @

virtual void run() override

Computes the group with maximum closeness on the graph passed in the constructor.

inline std::vector<node> groupMaxCloseness()

Returns group with maximum closeness.

double computeFarness(const std::vector<node> &S, count H = std::numeric_limits<count>::max()) const

Computes farness (i.e., inverse of the closeness) for a given group (stopping after H iterations if H > 0).

inline double scoreOfGroup(const std::vector<node> &group) const

Computes the score of a specific group.