Simulates a cluster graph

SimCluster(p, k, dens, r)

Arguments

p

number of nodes

k

number of groups in the cluster

dens

graph density

r

within/between ratio connection probability

Value

the adjacency matrix of size p x p

Examples

SimCluster(10,2,0.5, 10)
#> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] #> [1,] 0 1 0 1 0 0 0 1 1 1 #> [2,] 1 0 0 0 0 0 0 1 1 1 #> [3,] 0 0 0 0 1 1 1 0 1 0 #> [4,] 1 0 0 0 1 0 1 1 1 1 #> [5,] 0 0 1 1 0 0 1 0 0 0 #> [6,] 0 0 1 0 0 0 1 0 0 0 #> [7,] 0 0 1 1 1 1 0 1 0 0 #> [8,] 1 1 0 1 0 0 1 0 1 1 #> [9,] 1 1 1 1 0 0 0 1 0 1 #> [10,] 1 1 0 1 0 0 0 1 1 0