V- the graph vertex type
E- the graph edge type
public class LinearGraphGenerator<V,E> extends Object implements GraphGenerator<V,E,V>
|Modifier and Type||Field and Description|
Role for the last vertex generated.
Role for the first vertex generated.
|Constructor and Description|
Construct a new LinearGraphGenerator.
|Modifier and Type||Method and Description|
Generate a graph structure.
public static final String START_VERTEX
public LinearGraphGenerator(int size)
size- number of vertices to be generated
IllegalArgumentException- if the specified size is negative.
public void generateGraph(Graph<V,E> target, VertexFactory<V> vertexFactory, Map<String,V> resultMap)
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 elements
vertexFactory- called to produce new vertices
resultMap- if non-null, receives implementation-specific mappings from String roles to graph elements (or collections of graph elements)
Copyright © 2017. All rights reserved.