Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

coreness

K-core decomposition of graphs


Description

The k-core of graph is a maximal subgraph in which each vertex has at least degree k. The coreness of a vertex is k if it belongs to the k-core but not to the (k+1)-core.

Usage

coreness(graph, mode = c("all", "out", "in"))

Arguments

graph

The input graph, it can be directed or undirected

mode

The type of the core in directed graphs. Character constant, possible values: in: in-cores are computed, out: out-cores are computed, all: the corresponding undirected graph is considered. This argument is ignored for undirected graphs.

Details

The k-core of a graph is the maximal subgraph in which every vertex has at least degree k. The cores of a graph form layers: the (k+1)-core is always a subgraph of the k-core.

This function calculates the coreness for each vertex.

Value

Numeric vector of integer numbers giving the coreness of each vertex.

Author(s)

References

Vladimir Batagelj, Matjaz Zaversnik: An O(m) Algorithm for Cores Decomposition of Networks, 2002

Seidman S. B. (1983) Network structure and minimum degree, Social Networks, 5, 269–287.

See Also

Examples

g <- make_ring(10)
g <- add_edges(g, c(1,2, 2,3, 1,3))
coreness(g) 		# small core triangle in a ring

igraph

Network Analysis and Visualization

v1.2.10
GPL (>= 2)
Authors
See AUTHORS file.
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.