Class Betweenness

Inheritance Relationships

Base Type

Class Documentation

class Betweenness : public NetworKit::Centrality

Public Functions

Betweenness(const Graph &G, bool normalized = false, bool computeEdgeCentrality = false)

Constructs the Betweenness class for the given Graph G. If the betweenness scores should be normalized, then set normalized to true. The run() method takes O(nm) time, where n is the number of nodes and m is the number of edges of the graph.

  • G – The graph.

  • normalized – Set this parameter to true if scores should be normalized in the interval [0,1].

  • computeEdgeCentrality – Set this parameter to true if edge betweenness should be computed as well.

virtual void run() override

Computes betweenness scores on the graph passed in constructor.

virtual double maximum() override

Get the theoretical maximum of centrality score in the given graph.


The maximum centrality score.