closeness.residual: Find the residual closeness centrality

Description Usage Arguments Details Value Author(s) References Examples

Description

Residual closeness centrality defined as:

C_i=sum(1/2^d(i,j), j!=i)

Usage

1
2
closeness.residual(graph, vids = V(graph), mode = c("all", "out", "in"),
  weights = NULL)

Arguments

graph

The input graph as igraph object

vids

Vertex sequence, the vertices for which the centrality values are returned. Default is all vertices.

mode

Character constant, gives whether the shortest paths to or from the given vertices should be calculated for directed graphs. If out then the shortest paths from the vertex, if in then to it will be considered. If all, the default, then the corresponding undirected graph will be used, ie. not directed paths are searched. This argument is ignored for undirected graphs.

weights

Possibly a numeric vector giving edge weights. If this is NULL, the default, and the graph has a weight edge attribute, then the attribute is used. If this is NA then no weights are used (even if the graph has a weight attribute).

Details

This function calculate closeness of a vertex as Dangalchev defination.
More detail at Residual Closeness Centrality

Value

A numeric vector contaning the centrality scores for the selected vertices.

Author(s)

Mahdi Jalili m_jalili@farabi.tums.ac.ir

References

Dangalchev, Chavdar. "Residual closeness in networks." Physica A: Statistical Mechanics and its Applications 365.2 (2006): 556-564.

Examples

1
2
g <- graph(c(1,2,2,3,3,4,4,2))
closeness.residual(g)

Example output

Loading required package: igraph

Attaching package: 'igraph'

The following objects are masked from 'package:stats':

    decompose, spectrum

The following object is masked from 'package:base':

    union

Loading required package: Matrix
[1] 2.00 2.50 2.25 2.25

centiserve documentation built on May 2, 2019, 6:01 a.m.