Class WattsBetaSmallWorldGenerator<T>

  • All Implemented Interfaces:

    public class WattsBetaSmallWorldGenerator<T>
    extends AbstractGenerator<T>
    WattsBetaSmallWorldGenerator is a graph generator that produces a small world network using the beta-model as proposed by Duncan Watts. The basic ideas is to start with a one-dimensional ring lattice in which each vertex has k-neighbors and then randomly rewire the edges, with probability beta, in such a way that a small world networks can be created for certain values of beta and k that exhibit low charachteristic path lengths and high clustering coefficient.
    Jung Project, Nick Collier
    • Constructor Detail

      • WattsBetaSmallWorldGenerator

        public WattsBetaSmallWorldGenerator​(double beta,
                                            int degree,
                                            boolean symmetrical)
        Constructs the small world graph generator.
        beta - the probability of an edge being rewired randomly; the proportion of randomly rewired edges in a graph. Must be between 0 and 1.
        degree - the number of edges connected to each vertex around the local neighborhood. This is the local ngh size. Must be an even number.
        symmetrical - whether or not the generated edges will be symmetrical. This has no effect on a non-directed network.
    • Method Detail

      • createNetwork

        public Network<T> createNetwork​(Network<T> network)
        Generates a beta-network from a 1-lattice according to the parameters given.
        network - a network containing nodes
        a beta-network model that is potentially a small-world