Learn R Programming

cograph (version 2.7.2)

centrality_proximal_betweenness: Proximal betweenness centrality

Description

Fractions of shortest paths on which a node is the first or last intermediate vertex, following Brandes (2008), section 3.2, Algorithm 3. Paths have unit edge lengths. Each reachable ordered source-destination pair contributes equally, divided among all its shortest paths.

Usage

centrality_proximal_betweenness(x, proximal_variant = "source", ...)

Value

Named numeric vector in input node order.

Arguments

x

Network input accepted by centrality.

proximal_variant

One of "source" (default), "target", "sum", or "union".

...

Additional arguments to centrality. normalized = TRUE divides by the maximum score; all-zero results remain zero.

Details

The original terminology calls the last intermediate vertex the proximal source (a proxy interacting directly with the destination), and the first intermediate vertex the proximal target. The source variant is the default. Endpoints are excluded, so paths with fewer than two edges contribute nothing. The sum variant counts both roles; the union variant counts a vertex only once when a two-edge path places it in both roles. These are the two combination options in the paper.

Raw scores sum over ordered pairs, including on undirected graphs, following the displayed definition and Algorithm 3. They are not halved. Source and target scores agree on undirected graphs; sum is twice either score, whereas union removes the two-edge overlap. This convention is distinct from the usual unordered-pair scaling of undirected betweenness.

Uses the simple unweighted graph, retaining edge direction. Loops are removed and repeated edges count once after generic input processing. Weights, mode, inversion and cutoff do not affect this measure. Weighted shortest paths and edge-distinct multigraph paths are outside this implementation's verified domain. Unreachable pairs, isolates and complete graphs contribute zero; empty graphs return no scores.

Native breadth-first searches and dependency accumulation take O(n(n+m)) time after the current O(n squared) dense graph preparation. Path counts use double precision; a nonfinite count raises an error instead of returning invalid fractions. Counts above the exact-integer range can be rounded, so numerical equivalence is tolerance-based.

References

Brandes, U. (2008). On variants of shortest-path betweenness centrality and their generic computation. Social Networks, 30, 136-145. tools:::Rd_expr_doi("10.1016/j.socnet.2007.11.001").

Examples

Run this code
centrality_proximal_betweenness(igraph::make_graph("Zachary"))
centrality_proximal_betweenness(igraph::make_ring(5),
                              proximal_variant = "union")

Run the code above in your browser using DataLab