net.erdos.renyi.gnm: Directed / Undirected Erdos-Renyi G(n,m) network using a fix...

Description Usage Arguments Details Value Author(s) References Examples

View source: R/net.erdos.renyi.gnm.R

Description

Simulate a random network with n nodes and m edges, according to Erdos and Renyi (1959).

Usage

1
net.erdos.renyi.gnm(n, m, ncores = detectCores(), d = TRUE)

Arguments

n

Number of nodes of the network.

m

Number of edges of the network.

ncores

Number of cores, by default detectCores() from parallel.

d

A logical value determining whether is a network directed (default) or indirected.

Details

In this (simplest) random network, m edges are formed at random among n nodes. When d = TRUE is a directed network.

Value

A list containing the nodes of the network and their respective neighbors.

Author(s)

Xu Dong, Nazrul Shaikh.

References

Erdos, P. and Renyi, A., On random graphs, Publicationes Mathematicae 6, 290-297 (1959).

Examples

1
2
3
## Not run: 
x <- net.erdos.renyi.gnm(1000, 100) 
## End(Not run)

networkgroupR/fastnet documentation built on June 6, 2017, 10:20 a.m.