lv.lumii.layoutengine.flowLayout

## Class GraphProcessor

- java.lang.Object
- - lv.lumii.layoutengine.flowLayout.GraphProcessor

-     public class GraphProcessor
      extends java.lang.Object

  This class provides methods of processing graphs.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `GraphProcessor()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.util.ArrayList<java.lang.Integer>` | `bfsSorting(java.util.ArrayList<java.lang.Integer>[] adjStructure, int v0)` This method sorts the vertices of the given graph according the BFS order.
    `java.util.ArrayList<java.lang.Integer>` | `buildTreeDiameterPath(java.util.ArrayList<java.lang.Integer>[] adjStructure)` This method builds the diameter path of a tree.
    `java.util.ArrayList<FlowLayoutEdge>` | `calculateBFSTreeEdges(java.util.ArrayList<java.lang.Integer>[] adjStructure, int startVertex)` This method calculates the BFS-tree edges of a given graph.
    `int` | `calculateConnectedComponents(java.util.ArrayList<java.util.ArrayList<java.lang.Integer>> adjStructure, int[] compVector)` This method calculates connected components of the given graph.

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

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

- - ### Constructor Detail

    - #### GraphProcessor

          public GraphProcessor()

  - ### Method Detail

    - #### calculateConnectedComponents

          public int calculateConnectedComponents(java.util.ArrayList<java.util.ArrayList<java.lang.Integer>> adjStructure,
                                                  int[] compVector)

      This method calculates connected components of the given graph.
      Parameters:
        `adjStructure` - The adjacency structure of the given graph.
        `compVector` - The component characteristic vector.
      Returns:
        The number of components.

    - #### calculateBFSTreeEdges

          public java.util.ArrayList<FlowLayoutEdge> calculateBFSTreeEdges(java.util.ArrayList<java.lang.Integer>[] adjStructure,
                                                                           int startVertex)

      This method calculates the BFS-tree edges of a given graph.
      Parameters:
        `adjStructure` - The adjacency structure representing the given graph.
        `startVertex` - The start vertex.
      Returns:
        The BFS-tree edge list.

    - #### buildTreeDiameterPath

          public java.util.ArrayList<java.lang.Integer> buildTreeDiameterPath(java.util.ArrayList<java.lang.Integer>[] adjStructure)

      This method builds the diameter path of a tree.
      Parameters:
        `adjStructure` - The adjacency structure representing the given tree.
      Returns:
        The diameter path.

    - #### bfsSorting

          public java.util.ArrayList<java.lang.Integer> bfsSorting(java.util.ArrayList<java.lang.Integer>[] adjStructure,
                                                                   int v0)

      This method sorts the vertices of the given graph according the BFS order.
      Parameters:
        `adjStructure` - The adjacency structure representing the given graph.
        `v0` - The start vertex.
      Returns:
        Vertices in the BFS order.