public interface WSModel extends NetworkModel
Defines a network model that creates Network
instances with
small-world properties according to the algorithm of Watts & Strogatz. The
model starts from a k-regular network where the nodes have a degree of
2d (d is an argument provided to the model) and evolve from
that re-wiring each link with a probability p.
Modifier and Type | Method and Description |
---|---|
void |
configure(int numNodes,
int d,
double p,
long seed)
Configures this model to generate a small-world network with a given
number of nodes.
|
configure, generate, getConfiguration
void configure(int numNodes, int d, double p, long seed) throws org.apache.commons.configuration.ConfigurationException
numNodes
- number of nodes in the generated networkd
- minimum degree for the initial seed networkp
- re-wiring probability 0<=p<1 this is used to generate a
network between a k-regular network and a random network.seed
- the seed to be used in the random number generator of this
modelorg.apache.commons.configuration.ConfigurationException
- if the model is not correctly configured.