View source: R/neighborhood.inclusion.R

neighborhood_inclusion | R Documentation |

Calculates the neighborhood-inclusion preorder of an undirected graph.

```
neighborhood_inclusion(g, sparse = FALSE)
```

`g` |
An igraph object |

`sparse` |
Logical scalar, whether to create a sparse matrix |

Neighborhood-inclusion is defined as

`N(u)\subseteq N[v]`

where `N(u)`

is the neighborhood of `u`

and `N[v]=N(v)\cup \lbrace v\rbrace`

is the closed neighborhood of `v`

.
`N(u) \subseteq N[v]`

implies that `c(u) \leq c(v)`

,
where `c`

is a centrality index based on a specific path algebra. Indices
falling into this category are closeness (and variants), betweenness
(and variants) as well as many walk-based indices (eigenvector and subgraph
centrality, total communicability,...).

The neighborhood-inclusion preorder of `g`

as matrix object. `P[u,v]=1`

if `N(u)\subseteq N[v]`

David Schoch

Schoch, D. and Brandes, U., 2016. Re-conceptualizing centrality in social networks.
*European Journal of Applied Mathematics* 27(6), 971-985.

Brandes, U. Heine, M., Müller, J. and Ortmann, M., 2017.
Positional Dominance: Concepts and Algorithms.
*Conference on Algorithms and Discrete Applied Mathematics*, 60-71.

positional_dominance, exact_rank_prob

```
library(igraph)
# the neighborhood inclusion preorder of a star graph is complete
g <- graph.star(5, "undirected")
P <- neighborhood_inclusion(g)
comparable_pairs(P)
# the same holds for threshold graphs
tg <- threshold_graph(50, 0.1)
P <- neighborhood_inclusion(tg)
comparable_pairs(P)
# standard centrality indices preserve neighborhood-inclusion
data("dbces11")
P <- neighborhood_inclusion(dbces11)
is_preserved(P, degree(dbces11))
is_preserved(P, closeness(dbces11))
is_preserved(P, betweenness(dbces11))
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.