Learn R Programming

CINNA (version 1.2.0)

harmonic_centrality: Harmonic Centrality

Description

This function computes Harmonic Centrality. The harmonic metric defines as the denormalized reciprocal of the harmonic mean of all distances.

Usage

harmonic_centrality(
  x,
  vids = V(x),
  mode = c("all", "out", "in"),
  weights = NULL
)

Arguments

x

An igraph or a network object

vids

Nodes to be considered in the calculation

mode

a character value, <U+201C>out<U+201D> for out-degree, <U+201C>in<U+201D> for in-degree or <U+201C>total<U+201D> for the sum of the two. For undirected graphs this argument is ignored. <U+201C>all<U+201D> is a synonym of <U+201C>total<U+201D>.

weights

Numeric vector indicating weights of the edges

Value

a vector including centrality values for each node

References

BOLDI, P. & VIGNA, S. 2014. Axioms for centrality. Internet Mathematics, 00-00.

MARCHIORI, M. & LATORA, V. 2000. Harmony in the small-world. Physica A: Statistical Mechanics and its Applications, 285, 539-546.

OPSAHL, T., AGNEESSENS, F. & SKVORETZ, J. 2010. Node centrality in weighted networks: Generalizing degree and shortest paths. Social Networks, 32, 245-251.

OPSAHL, T. 2010. Closeness centrality in networks with disconnected components (http://toreopsahl.com/2010/03/20/closeness-centrality-in-networks-with-disconnected-components/)

Examples

Run this code
# NOT RUN {
data(zachary)

harmonic_centrality(zachary)

# }

Run the code above in your browser using DataLab