graph20 {NetworkDistance} | R Documentation |
20 adjacency matrices from Erdős–Rényi models
Description
Simulated list of 20 adjacency matrices of 28 nodes. First 10 are from Erdős–Rényi model with p=0.9
, and
the latter 10 are generated using p=0.5
. Each element in the list is of size (28\times 28)
, symmetric,
having values in 0
or 1
, and every diagonal element is set as 0
in accordance with no self-loop assumption.
Usage
data(graph20)
Format
A list
of 20 adjacency matrices of size (28\times 28)
.
Details
Below is the code used to generate graph20:
require(stats) graph20 = list() for (i in 1:10){ # type-1 adjacency matrices rbin = rbinom(784,1,0.9) mat = matrix(rbin, nrow=28) matout = mat*t(mat) diag(matout) = 0 graph20[[i]]=matout } for (i in 11:20){ # type-2 adjacency matrices rbin = rbinom(784,1,0.5) mat = matrix(rbin, nrow=28) matout = mat*t(mat) diag(matout) = 0 graph20[[i]]=matout }
[Package NetworkDistance version 0.3.4 Index]