public class LayeredGraph
extends java.lang.Object
Constructor and Description |
---|
LayeredGraph(int numberOfLevels)
This method is the class constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addEdge(LayeredNode sourceNode,
LayeredNode targetNode)
This method adds an edge to this layered graph.
|
void |
addLevelNode(int level,
LayeredNode node)
This method adds the given node to the specified level.
|
java.util.ArrayList<LayeredNode> |
getLevelNodeList(int level)
This method returns the list of nodes of the specified level.
|
int |
getNumberOfLevels()
This method returns the number of levels.
|
public LayeredGraph(int numberOfLevels)
numberOfLevels
- the number of levels nodes are grouped into.public int getNumberOfLevels()
public void addLevelNode(int level, LayeredNode node)
level
- the level index.node
- the node to be added.public java.util.ArrayList<LayeredNode> getLevelNodeList(int level)
level
- the level index.public void addEdge(LayeredNode sourceNode, LayeredNode targetNode)
sourceNode
- the from node of the edge to be added.targetNode
- the to node of the edge to be added.