public class UniformRandomGraphGenerator extends Object implements GraphGenerator
Constructor and Description |
---|
UniformRandomGraphGenerator(int numVertices,
int numEdges)
Construct a new UniformRandomGraphGenerator.
|
Modifier and Type | Method and Description |
---|---|
void |
generateGraph(Graph target,
VertexFactory vertexFactory,
Map resultMap)
Generate a graph structure.
|
public UniformRandomGraphGenerator(int numVertices, int numEdges)
numVertices
- number of vertices to be generatednumEdges
- number of edges to be generatedIllegalArgumentException
public void generateGraph(Graph target, VertexFactory vertexFactory, Map resultMap)
GraphGenerator
generateGraph
in interface GraphGenerator
target
- receives the generated edges and vertices; if this is
non-empty on entry, the result will be a disconnected graph since
generated elements will not be connected to existing elementsvertexFactory
- called to produce new verticesresultMap
- if non-null, receives implementation-specific mappings
from String roles to graph elements (or collections of graph elements)GraphGenerator.generateGraph(org.jgrapht.Graph<V, E>, org.jgrapht.VertexFactory<V>, java.util.Map<java.lang.String, T>)
Copyright © 2016. All rights reserved.