How can you generate small world or scale-free networks with a certain density, say
In the case of random networks it seems easy because an edge is drawn based on a certain probability. However, this doesn't seem to be so straightforward for the small world and scale-free architectures. I was thinking of starting with a dense network and randomly remove edges until a certain density is met. But I think this is not correct, because in the case of small world and scale-free architectures the edges are drawn iteratively using rewiring probability and preferential attachment.
I am trying to do this in
igraph and any hints would be extremely helpful.