Defined in File Closeness.hpp
public NetworKit::Centrality
(Class Centrality)
Public Functions
Constructs the Closeness class for the given Graph G. If the closeness 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. NOTICE: the graph has to be connected.
G – The graph.
normalized – Set this parameter to false
if scores should not be normalized into an interval of [0, 1]. Normalization only for unweighted graphs.
Old constructor, we keep it for backward compatibility. It computes the standard variant of the closenes.
G – The graph.
normalized – Set this parameter to false
if scores should not be normalized into an interval of [0, 1]. Normalization only for unweighted graphs.
checkConnectedness – turn this off if you know the graph is connected.
Computes closeness cetrality on the graph passed in constructor.
Get the theoretical maximum of centrality score in the given graph.
The maximum centrality score.