V
 the graph vertex typeE
 the graph edge typepublic class WheelGraphGenerator<V,E> extends Object implements GraphGenerator<V,E,V>
Modifier and Type  Field and Description 

static String 
HUB_VERTEX
Role for the hub vertex.

Constructor and Description 

WheelGraphGenerator(int size)
Creates a new WheelGraphGenerator object.

WheelGraphGenerator(int size,
boolean inwardSpokes)
Construct a new WheelGraphGenerator.

Modifier and Type  Method and Description 

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

public static final String HUB_VERTEX
public WheelGraphGenerator(int size)
size
 number of vertices to be generated.public WheelGraphGenerator(int size, boolean inwardSpokes)
size
 number of vertices to be generated.inwardSpokes
 if true
and graph is directed, spokes are oriented from rim
to hub; else from hub to rim.IllegalArgumentException
 in case the number of vertices is negativepublic void generateGraph(Graph<V,E> target, VertexFactory<V> vertexFactory, Map<String,V> resultMap)
generateGraph
in interface GraphGenerator<V,E,V>
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.