edu.uci.ics.jung.random.generators
Class SimpleRandomGenerator
java.lang.Object
edu.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
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SimpleRandomGenerator
public SimpleRandomGenerator(int numVertices,
int numEdges)
- Constructs the generator
- Parameters:
numVertices
- number of vertices the graph should havenumEdges
- number of edges the graph should have
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.