Home   >   User Resources   >   Online Help   >   apaGraph.BetweennessCentrality.FromEdges
 

 

Function index Version 3.0.0

apaGraph.BetweennessCentrality.FromEdges(Edges, NumberOfNodes, IsWeighted, IsRescaled)

Excel=apaGraph.BetweennessCentrality.FromEdges(Edges, NumberOfNodes, IsWeighted, IsRescaled)

Result

Calculates the betweenness centrality of the nodes of an undirected graph, weighted or unweighted, with Brandes’ algorithm.

Syntax

Edges: graph as an edge list, i.e. an n x 3 data matrix, the first two columns containing the node indices and the third column the distance between the two nodes

NumberOfNodes: total number of nodes

IsWeighted: TRUE for weighted graphs, FALSE for unweighted graphs (unit weights)

IsRescaled: TRUE to normalize by 2/((n-1)(n-2)) for undirected graphs

Remarks

If IsWeighted is TRUE, the shortest paths are determined from the distances in the third column of Edges; otherwise each edge has length 1. For graphs with two nodes or fewer, all betweenness values are 0.