edu.uci.ics.jung.random.generators
Class EppsteinPowerLawGenerator

java.lang.Object
  extended byedu.uci.ics.jung.random.generators.EppsteinPowerLawGenerator
All Implemented Interfaces:
GraphGenerator

public class EppsteinPowerLawGenerator
extends java.lang.Object
implements GraphGenerator

Graph generator that generates undirected sparse graphs with power-law distributions.

Author:
Scott White
See Also:
"A Steady State Model for Graph Power Law by David Eppstein and Joseph Wang"

Constructor Summary
EppsteinPowerLawGenerator(int numVertices, int numEdges, int r)
          Constructor which specifies the parameters of the generator
 
Method Summary
 ArchetypeGraph generateGraph()
          Generates a graph whose degree distribution approximates a power-law.
 void setSeed(long seed)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EppsteinPowerLawGenerator

public EppsteinPowerLawGenerator(int numVertices,
                                 int numEdges,
                                 int r)
Constructor which specifies the parameters of the generator

Parameters:
numVertices - the number of vertices for the generated graph
numEdges - the number of edges the generated graph will have, should be Theta(numVertices)
r - the model parameter. The larger the value for this parameter the better the graph's degree distribution will approximate a power-law.
Method Detail

generateGraph

public ArchetypeGraph generateGraph()
Generates a graph whose degree distribution approximates a power-law.

Specified by:
generateGraph in interface GraphGenerator
Returns:
the generated graph

setSeed

public void setSeed(long seed)