public class GraphReader<V,E> extends java.lang.Object implements GraphGenerator<V,E,V>
Constructor and Description |
---|
GraphReader(java.lang.String file)
Construct a new LinearGraphGenerator.
|
Modifier and Type | Method and Description |
---|---|
void |
generateGraph(Graph<V,E> target,
VertexFactory<V> vertexFactory,
java.util.Map<java.lang.String,V> resultMap)
Generate a graph structure.
|
static void |
main(java.lang.String[] args) |
public GraphReader(java.lang.String file) throws java.io.IOException
size
- number of vertices to be generatedjava.lang.IllegalArgumentException
- if the specified size is negative.java.io.IOException
public void generateGraph(Graph<V,E> target, VertexFactory<V> vertexFactory, java.util.Map<java.lang.String,V> resultMap)
generateGraph
in interface GraphGenerator<V,E,V>
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)public static void main(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception