extract_node_closeness(targets: list[number], *weights: list[number], {
    "param": value,
    ...
}) -> (closeness: number)

Calculates the closeness centrality for each node in the network. Closeness centrality is a measure of how many steps are required to access every other vertex from a given vertex. In other words, it finds the nodes best placed to influence the entire network most quickly.

extract_node_closeness(targets: list[number], *weights: list[number], {
    "param": value,
    ...
}) -> (closeness: number)
mode
string
default:
"all"

Which node connections to count. Whether to

  • in: count only a node’s incoming links
  • out: count only a node’s outgoing links
  • all/both count both incoming and outgoing links.

Values must be one of the following:

  • all
  • out
  • in
  • both
normalized
boolean
default:
"true"

Whether to calculate the normalized closeness.

cutoff
[number, null]

The maximum path length to consider when calculating the betweenness. If cutoff is zero or negative then there is no such limit.