local_reaching_centrality(G, v, paths=None, weight=None, normalized=True)¶
Returns the local reaching centrality of a node in a directed graph.
The local reaching centrality of a node in a directed graph is the proportion of other nodes reachable from that node .
A NetworkX DiGraph.
A node in the directed graph
- pathsdictionary (default=None)
If this is not
Noneit must be a dictionary representation of single-source shortest paths, as computed by, for example,
networkx.shortest_path()with source node
v. Use this keyword argument if you intend to invoke this function many times but don’t want the paths to be recomputed each time.
- weightNone or string, optional (default=None)
Attribute to use for edge weights. If
None, each edge weight is assumed to be one. A higher weight implies a stronger connection between nodes and a shorter path length.
- normalizedbool, optional (default=True)
Whether to normalize the edge weights by the total sum of edge weights.
The local reaching centrality of the node
vin the graph
Mones, Enys, Lilla Vicsek, and Tamás Vicsek. “Hierarchy Measure for Complex Networks.” PLoS ONE 7.3 (2012): e33799. https://doi.org/10.1371/journal.pone.0033799
>>> G = nx.DiGraph() >>> G.add_edges_from([(1, 2), (1, 3)]) >>> nx.local_reaching_centrality(G, 3) 0.0 >>> G.add_edge(3, 2) >>> nx.local_reaching_centrality(G, 3) 0.5