V
- the graph vertex typeE
- the graph edge typepublic class SimpleWeightedGraphMatrixGenerator<V,E> extends Object implements GraphGenerator<V,E,V>
Modifier and Type | Field and Description |
---|---|
protected List<V> |
vertices |
protected double[][] |
weights |
Constructor and Description |
---|
SimpleWeightedGraphMatrixGenerator() |
Modifier and Type | Method and Description |
---|---|
void |
generateGraph(Graph<V,E> target,
Map<String,V> resultMap)
Generate a graph structure.
|
SimpleWeightedGraphMatrixGenerator<V,E> |
vertices(List<V> vertices)
Set the generator vertices.
|
SimpleWeightedGraphMatrixGenerator<V,E> |
weights(double[][] weights)
Set the weights of the generator.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
generateGraph, generateGraph, generateGraph
public SimpleWeightedGraphMatrixGenerator<V,E> vertices(List<V> vertices)
vertices
- the graph verticespublic SimpleWeightedGraphMatrixGenerator<V,E> weights(double[][] weights)
weights
- the weightspublic void generateGraph(Graph<V,E> target, Map<String,V> resultMap)
GraphGenerator
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 elementsresultMap
- if non-null, receives implementation-specific mappings from String roles to
graph elements (or collections of graph elements)Copyright © 2018. All rights reserved.