rewireEdge: Rewire origin or destination of an edge

Description Usage Arguments Value Examples

View source: R/rewiring.R

Description

Preferential attachment can be included by passing some paramters to ...

Usage

1
2
3
4
5
6
7
8
rewireEdge(
  g,
  edge = sample(E(g), 1),
  what = c("origin", "destination"),
  vs = V(g),
  multi.edges = FALSE,
  ...
)

Arguments

g

An igraph object

edge

An igraph.es edge to rewire. Default is 1 random edge.

what

For directed graphs, what to rewire: "origin" or "destination" ? Default is "origin".

vs

igraph.vs vertices towards which edge origin or destination can be rewired.

multi.edges

Wheter or not multi edges can be created during the process. Default is FALSE.

...

Other parameters passed to getVertices function.

Value

An igraph object with 1 edge rewired.

Examples

1
2
3
4
library(igraph)
g = generateSupplyNet()
for (i in 1:100)
  g = rewireEdge(g)

MiloMonnier/supplynet documentation built on Feb. 16, 2021, 8:03 p.m.