Class InducedGraph


  • public class InducedGraph
    extends Object
    Represents a process graph induced by a given set of nodes. The induced graph is not built, instead the information of predecessors and successors is found lazily and cached. TODO naming: 'induced'? TODO write getSuccessor TODO only optional preds means, that the node can be the first one! need to introduce a null node? still, the info lays in the noderelation and is not lost. anyways: if all optional nodes are in all different branches of an or-block, the node can't be the first one!!!
    Author:
    Kevin Goeser
    • Field Detail

      • logger

        protected final Logger logger
        The logger for graphs. It is protected for extensibility.
    • Constructor Detail

      • InducedGraph

        public InducedGraph​(Template template,
                            NodeRelations relations,
                            LinkedList<Node> graphNodes)
        Create an induced graph, using the given node relations, topological sorting and the graph nodes inducing the new graph. Note: the graph nodes must already be sorted topologically.
        Parameters:
        template - the template containing the graph
        relations -
        graphNodes - Topologically sorted nodes which induce the graph.
    • Method Detail

      • getPredecessors

        public HashSet<Node> getPredecessors​(Node node)
        Finds all predecessors of the given node within the induced graph.
        Parameters:
        node -
        Returns:
        A set containing the precedessors