org._3pq.jgrapht.generate

Class LinearGraphGenerator

Implemented Interfaces:
GraphGenerator

public class LinearGraphGenerator
extends java.lang.Object
implements GraphGenerator

Generates a linear graph of any size. For a directed graph, the edges are oriented from START_VERTEX to END_VERTEX.
Author:
John V. Sichi
Since:
Sep 16, 2003

Field Summary

static String
END_VERTEX
Role for the last vertex generated.
static String
START_VERTEX
Role for the first vertex generated.

Constructor Summary

LinearGraphGenerator(int size)
Construct a new LinearGraphGenerator.

Method Summary

void
generateGraph(Graph target, VertexFactory vertexFactory, Map resultMap)

Field Details

END_VERTEX

public static final String END_VERTEX
Role for the last vertex generated.

START_VERTEX

public static final String START_VERTEX
Role for the first vertex generated.

Constructor Details

LinearGraphGenerator

public LinearGraphGenerator(int size)
Construct a new LinearGraphGenerator.
Parameters:
size - number of vertices to be generated

Method Details

generateGraph

public void generateGraph(Graph target,
                          VertexFactory vertexFactory,
                          Map resultMap)
Specified by:
generateGraph in interface GraphGenerator