networkx 2.8.2 Pypi GitHub Homepage
Other Docs
ParametersReturnsBackRef
local_reaching_centrality(G, v, paths=None, weight=None, normalized=True)

The local reaching centrality of a node in a directed graph is the proportion of other nodes reachable from that node .

Parameters

G : DiGraph

A NetworkX DiGraph.

v : node

A node in the directed graph G.

paths : dictionary (default=None)

If this is not :None:None:`None` it 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.

weight : None or string, optional (default=None)

Attribute to use for edge weights. If :None:None:`None`, each edge weight is assumed to be one. A higher weight implies a stronger connection between nodes and a shorter path length.

normalized : bool, optional (default=True)

Whether to normalize the edge weights by the total sum of edge weights.

Returns

h : float

The local reaching centrality of the node v in the graph G .

Returns the local reaching centrality of a node in a directed graph.

See Also

global_reaching_centrality

Examples

>>> 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
See :

Back References

The following pages refer to to this document either explicitly or contain code examples using this.

networkx.algorithms.centrality.reaching.global_reaching_centrality networkx.algorithms.centrality.reaching.local_reaching_centrality

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


GitHub : /networkx/algorithms/centrality/reaching.py#122
type: <class 'function'>
Commit: