V
 the graph vertex typeE
 the graph edge typeT
 type for returning implementationspecific mappings from String roles to graph
elementspublic abstract class WeightedGraphGeneratorAdapter<V,E,T> extends Object implements GraphGenerator<V,E,T>
Modifier and Type  Field and Description 

protected double[][] 
weights 
Constructor and Description 

WeightedGraphGeneratorAdapter() 
Modifier and Type  Method and Description 

void 
generateGraph(Graph<V,E> target,
VertexFactory<V> vertexFactory,
Map<String,T> resultMap)
Generate a graph structure.

abstract void 
generateGraph(WeightedGraph<V,E> target,
VertexFactory<V> vertexFactory,
Map<String,T> resultMap)
Generate a weighted graph structure.

WeightedGraphGeneratorAdapter<V,E,T> 
weights(double[][] weights)
Set the weights of the generator.

public abstract void generateGraph(WeightedGraph<V,E> target, VertexFactory<V> vertexFactory, Map<String,T> resultMap)
target
 receives the generated edges and vertices; if this is nonempty 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 nonnull, receives implementationspecific mappings from String roles to
graph elements (or collections of graph elements)public WeightedGraphGeneratorAdapter<V,E,T> weights(double[][] weights)
weights
 the weightspublic void generateGraph(Graph<V,E> target, VertexFactory<V> vertexFactory, Map<String,T> resultMap)
generateGraph
in interface GraphGenerator<V,E,T>
target
 receives the generated edges and vertices; if this is nonempty 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 nonnull, receives implementationspecific mappings from String roles to
graph elements (or collections of graph elements)Copyright © 2016. All rights reserved.