Module omix.api

Class Graph<E,​N>

java.lang.Object
omix.util.math.graph.Graph<E,​N>
Type Parameters:
E - type of the reference edges
N - type of the reference nodes

public final class Graph<E,​N>
extends Object
Graph analysis tool. This class allowes to compute connected components and strongly connected components inside a given graph. The graph must be specified by adding nodes (addNode(Object)) and edges (addEdge(Object, Object, Object)). Thereafter, the method analyze() computes the CCs and SCCs of the graph.
Author:
Dr. Peter Droste, Omix Visualization
  • Constructor Summary

    Constructors 
    Constructor Description
    Graph()  
  • Method Summary

    Modifier and Type Method Description
    void addEdge​(E edge, N srcNode, N dstNode)
    Edges can be added by specifying a reference to any kind of external edge connecting two nodes.
    void addNode​(N node)
    Nodes can be added by specifying a reference to any kind of external graph component.
    List<CC<E,​N>> analyze()
    Computation of all CCs and SCCs in the graph.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • analyze

      public List<CC<E,​N>> analyze()
      Computation of all CCs and SCCs in the graph.
      Returns:
      List of CCs containing SCCs
    • addNode

      public void addNode​(N node)
      Nodes can be added by specifying a reference to any kind of external graph component.
      Parameters:
      node -
    • addEdge

      public void addEdge​(E edge, N srcNode, N dstNode)
      Edges can be added by specifying a reference to any kind of external edge connecting two nodes.
      Parameters:
      edge - reference to an edge object
      srcNode - reference to the connected source node
      dstNode - reference to the connected destination node