lv.lumii.layoutengine.flowLayout.horizontalOrdering

## Class LayeredGraph

- java.lang.Object
- - lv.lumii.layoutengine.flowLayout.horizontalOrdering.LayeredGraph

-     public class LayeredGraph
      extends java.lang.Object

  This class implements an auxiliary layered graph needed for the horizontal ordering in the Flow Layout algorithm.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `LayeredGraph(int numberOfLevels)` This method is the class constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    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.

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### LayeredGraph

          public LayeredGraph(int numberOfLevels)

      This method is the class constructor.
      Parameters:
        `numberOfLevels` - the number of levels nodes are grouped into.

  - ### Method Detail

    - #### getNumberOfLevels

          public int getNumberOfLevels()

      This method returns the number of levels.
      Returns:
        the number of levels.

    - #### addLevelNode

          public void addLevelNode(int level,
                                   LayeredNode node)

      This method adds the given node to the specified level.
      Parameters:
        `level` - the level index.
        `node` - the node to be added.

    - #### getLevelNodeList

          public java.util.ArrayList<LayeredNode> getLevelNodeList(int level)

      This method returns the list of nodes of the specified level.
      Parameters:
        `level` - the level index.
      Returns:
        the list of nodes.

    - #### addEdge

          public void addEdge(LayeredNode sourceNode,
                              LayeredNode targetNode)

      This method adds an edge to this layered graph.
      Parameters:
        `sourceNode` - the from node of the edge to be added.
        `targetNode` - the to node of the edge to be added.