Class InducedGraph
java.lang.Object
de.aristaflow.adept2.model.processmodel.tools.InducedGraph
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 Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionInducedGraph(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. -
Method Summary
Modifier and TypeMethodDescriptiongetPredecessors(Node node) Finds all predecessors of the given node within the induced graph.
-
Field Details
-
logger
The logger for graphs. It is protected for extensibility.
-
-
Constructor Details
-
InducedGraph
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 graphrelations-graphNodes- Topologically sorted nodes which induce the graph.
-
-
Method Details
-
getPredecessors
Finds all predecessors of the given node within the induced graph.- Parameters:
node-- Returns:
- A set containing the precedessors
-