Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## edu.uci.ics.jung.random.generators
Class KleinbergSmallWorldGenerator

    java.lang.Object
      edu.uci.ics.jung.random.generators.Lattice2DGenerator
          edu.uci.ics.jung.random.generators.KleinbergSmallWorldGenerator

All Implemented Interfaces:
  GraphGenerator

public class KleinbergSmallWorldGenerator
extends Lattice2DGenerator

Graph generator that produces a random graph with small world properties. The underlying model is an nxn toroidal lattice. Each node u has four local connections, one to each of its neighbors, and in addition one long range connection to some node v where v is chosen randomly according to probability proportional to d^-alpha where d is the lattice distance between u and v and alpha is the clustering expononent.

Author:
  Scott White
See Also:
  "Navigation in a small world J. Kleinberg, Nature 406(2000), 845."

Constructor Summary
`KleinbergSmallWorldGenerator(int latticeSize, double clusteringExponent)` Constructs the small world graph generator.

Method Summary
`ArchetypeGraph` | `generateGraph()` Generates a random small world network according to the parameters given
`double` | `getClusteringExponent()`
`void` | `setClusteringExponent(double clusteringExponent)`

Methods inherited from class edu.uci.ics.jung.random.generators.Lattice2DGenerator
`downIndex, getLatticeSize, leftIndex, rightIndex, upIndex`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### KleinbergSmallWorldGenerator

    public KleinbergSmallWorldGenerator(int latticeSize,
                                        double clusteringExponent)

  Constructs the small world graph generator.

Parameters:
  `latticeSize` - the lattice size (length of row or column dimension)
  `clusteringExponent` - the clustering exponent parameter (somewhere around 2 is a good choice)

Method Detail

### generateGraph

    public ArchetypeGraph generateGraph()

  Generates a random small world network according to the parameters given

  Specified by:
    `generateGraph` in interface `GraphGenerator`
  Overrides:
    `generateGraph` in class `Lattice2DGenerator`
  Returns:
    a random small world graph

### getClusteringExponent

    public double getClusteringExponent()

### setClusteringExponent

    public void setClusteringExponent(double clusteringExponent)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD