set.seed(27)
lazy_sbm <- sbm(n = 1000, k = 5, expected_density = 0.01)
lazy_sbm
# by default we get a multigraph (i.e. multiple edges are
# allowed between the same two nodes). using bernoulli edges
# will with an adjacency matrix with only zeroes and ones
bernoulli_sbm <- sbm(
n = 5000,
k = 300,
poisson_edges = FALSE,
expected_degree = 8
)
bernoulli_sbm
edgelist <- sample_edgelist(bernoulli_sbm)
edgelist
A <- sample_sparse(bernoulli_sbm)
# only zeroes and ones!
sign(A)
Run the code above in your browser using DataLab