annas.graph.generate
Class LinearGraphGenerator<N,A extends ArcInterface<N>>
java.lang.Object
annas.graph.generate.LinearGraphGenerator<N,A>
- Type Parameters:
N
- Node typeA
- Arc type
- All Implemented Interfaces:
- GraphGenerator<N,A>
public class LinearGraphGenerator<N,A extends ArcInterface<N>>
- extends java.lang.Object
- implements GraphGenerator<N,A>
Generates a linear Graph, a straight line graph
- Author:
- Sam Wilson
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LinearGraphGenerator
public LinearGraphGenerator(int length)
generate
public void generate(GraphInterface<N,A> target,
NodeFactory<N> factory,
java.util.Map<java.lang.String,java.lang.Object> map)
- Generates a graph.
- Specified by:
generate
in interface GraphGenerator<N,A extends ArcInterface<N>>
- Parameters:
target
- Target Graph objectfactory
- Factory for creating nodes.map
- Provides a means of communication data to the generating
algorithm.
getStart_node
public N getStart_node()
- Returns:
- the start_node
setStart_node
public void setStart_node(N startNode)
- Parameters:
startNode
- the start_node to set
getEnd_node
public N getEnd_node()
- Returns:
- the end_node
setEnd_node
public void setEnd_node(N endNode)
- Parameters:
endNode
- the end_node to set
getLength
public int getLength()
- Returns:
- the length
setLength
public void setLength(int length)
- Parameters:
length
- the length to set