public class RingGraphGenerator extends java.lang.Object implements GraphGenerator
Constructor and Description |
---|
RingGraphGenerator(int size)
Construct a new RingGraphGenerator.
|
Modifier and Type | Method and Description |
---|---|
void |
generateGraph(Graph target,
VertexFactory vertexFactory,
java.util.Map resultMap)
Generate a graph structure.
|
public RingGraphGenerator(int size)
size
- number of vertices to be generatedjava.lang.IllegalArgumentException
- if the specified size is negative.public void generateGraph(Graph target, VertexFactory vertexFactory, java.util.Map resultMap)
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)