sample_sbm function
Details. This function samples graphs from a stochastic block model by (doing the equivalent of) Bernoulli trials for each potential edge with the probabilities given by the Bernoulli rate matrix, pref.matrix . The order of the vertices in the generated graph corresponds to the block.sizes argument.