adja_gnp | R Documentation |
This function generates a network from the Erdos-Renyi model.
adja_gnp(N, alpha, directed = FALSE)
N |
The number of nodes on the network. |
alpha |
The network density. A value in |
directed |
Logical scalar, whether to generate a directed network. If TRUE a directed network is generated. |
For each pair of nodes it performs a Bernoulli trial with values 1 "draw an edge", 0 "otherwise".
Each trial has the same probability of having an edge; this is equal to \alpha*N^{-0.3}
, specified based on the number of nodes on the network N
and the network density alpha
.
A row-normalized non-negative matrix describing the network. The main diagonal entries of the matrix are zeros, all the other entries are non-negative and the maximum sum of elements over the rows equals one.
Mirko Armillotta, Michail Tsagris and Konstantinos Fokianos.
Erdos, P. and A. Renyi (1959). On random graphs. Publicationes Mathematicae, 6, 290–297.
adja
W <- adja_gnp(N = 20, alpha= 0.1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.