Description Usage Arguments Value Examples
During a rewiring process, several operations such as nodes deletion can make change the average degree of a graph. This function aims to re-adjust the number of edges to a given level by adding or deleting edges randomly.
1 | adjustAvgDegree(g, avg.degree = 1.470968, ...)
|
g |
an igraph object. |
avg.degree |
numeric; the expected average degree. |
... |
other arguments passed to |
an igraph object.
1 2 3 4 5 6 7 | library(igraph)
g = generateSupplyNet()
plot(g)
ecount(g) / vcount(g)
g = adjustAvgDegree(g, avg.degree=3)
ecount(g) / vcount(g)
plot(g)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.