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

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

public class ErdosRenyiGenerator
extends java.lang.Object
implements GraphGenerator

Random Generator of Erdos-Renyi "binomial model"

Author:
William Giordano, Scott White

Constructor Summary
ErdosRenyiGenerator(int numVertices, double p)
           
 
Method Summary
 ArchetypeGraph generateGraph()
          Instructs the algorithm to generate the graph
 void setSeed(long seed)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ErdosRenyiGenerator

public ErdosRenyiGenerator(int numVertices,
                           double p)
Parameters:
numVertices - number of vertices graph should have
p - Connection's probability between 2 vertices
Method Detail

generateGraph

public ArchetypeGraph generateGraph()
Description copied from interface: GraphGenerator
Instructs the algorithm to generate the graph

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

setSeed

public void setSeed(long seed)