Creates a randomly permuted DCPP connectivity matrix with a given average expected degree
gen_rand_conn(n, K, lambda, gamma = 0.3, pri = rep(1, K)/K, theta = rep(1, n))
connectivity matrix B of the desired DCSBM.
number of nodes
number of communities
expected average degree
a measure of out-in-ratio (convex combination parameter)
the prior on community labels
node connection propensity parameter of DCSBM, by default E(theta) = 1
The connectivity matrix is a convex combination of a random symmetric permutation matrix and the matrix of all ones, with weights gamm and 1-gamma.