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

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

public class SimpleRandomGenerator
extends java.lang.Object
implements GraphGenerator

Simple graph generator where |V| vertices are generated and |E| random edges chosen pairwise uniformly

Author:
William Giordano, Scott White

Constructor Summary
SimpleRandomGenerator(int numVertices, int numEdges)
          Constructs the generator
 
Method Summary
 ArchetypeGraph generateGraph()
          Generated the graph by creating |V| vertics and then picking |E| random edges
 long getNumEdges()
           
 long getNumVertices()
           
 void setSeed(long seed)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleRandomGenerator

public SimpleRandomGenerator(int numVertices,
                             int numEdges)
Constructs the generator

Parameters:
numVertices - number of vertices the graph should have
numEdges - number of edges the graph should have
Method Detail

setSeed

public void setSeed(long seed)

generateGraph

public ArchetypeGraph generateGraph()
Generated the graph by creating |V| vertics and then picking |E| random edges

Specified by:
generateGraph in interface GraphGenerator
Returns:
generated graph

getNumEdges

public long getNumEdges()
Returns:
Returns the mNumEdges.

getNumVertices

public long getNumVertices()
Returns:
Returns the mNumVertices.