net.barabasi.albert: Barabasi-Albert Scale-free Graph

Description Usage Arguments Details Value Author(s) References Examples

View source: R/net.barabasi.albert.R

Description

Simulate a scale-free network using a preferential attachment mechanism (Barabasi and Albert, 1999)

Usage

1
net.barabasi.albert(n, m, ncores = detectCores(), d = FALSE)

Arguments

n

Number of nodes of the network.

m

Number of nodes to which a new node connects at each iteration.

ncores

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

d

A logical value determining whether the generated network is a directed or undirected (default) network.

Details

Starting with m nodes, the preferential attachment mechaism adds one node and m edges in each step. The edges will be placed with one end on the newly-added node and the other end on the existing nodes, according to probabilities that associate with their current degrees.

Value

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

Author(s)

Luis Castro, Xu Dong, Nazrul Shaikh.

References

Barabasi, A.- L. and Albert R. 1999. Emergence of scaling in random networks. Science, 286 509-512.

Examples

1
2
3
## Not run: 
x <- net.barabasi.albert(1000, 20) # using default ncores 
## End(Not run)

fastnet documentation built on Jan. 13, 2021, 5:28 p.m.