public class NodeRelations
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
NodeRelations.NodeRelation
This represents the relation between two nodes.
|
| Modifier and Type | Field and Description |
|---|---|
protected java.util.logging.Logger |
logger
my logger
|
| Constructor and Description |
|---|
NodeRelations(Template template)
Create a new NodeRelations object for the given template.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
atLeastOneIsExecutedBefore(java.util.HashSet<java.lang.Integer> optionalPreds,
int nodeID)
Returns true, if one of the predecessors is executed for sure.
|
NodeRelations.NodeRelation |
getNodeRelation(int nodeID1,
int nodeID2)
Get the BEFORE relation between the given nodes, or what the relation
is like, if node1 is not before node2.
|
java.lang.String |
getStatsString()
Print stats.
|
static boolean |
isBefore(NodeRelations.NodeRelation nodeRelation) |
protected static boolean |
nodesAreOnDifferentBranchesOfSplit(Template template,
int nodeID1,
int nodeID2,
int commonSplitNodeID)
Returns true, if the given nodes are on different branches relative to
the given split node.
|
public NodeRelations(Template template)
template - public NodeRelations.NodeRelation getNodeRelation(int nodeID1, int nodeID2)
nodeID1 - The first node, preferably it is before node2.nodeID2 - The second node, preferable after node1.NodeRelations(Template)protected static boolean nodesAreOnDifferentBranchesOfSplit(Template template, int nodeID1, int nodeID2, int commonSplitNodeID)
false:
n1 n2
/ \ / \
x ----- x ---x-----x--...
/
sn --- ...
true:
... n1
/
sn
\
... n2
FIXME this is just quick'n'dirty low-performance garbage code, rewritetemplate - TODOnodeID1 - nodeID2 - commonSplitNodeID - public static boolean isBefore(NodeRelations.NodeRelation nodeRelation)
public java.lang.String getStatsString()
public boolean atLeastOneIsExecutedBefore(java.util.HashSet<java.lang.Integer> optionalPreds,
int nodeID)
optionalPreds - Predecessors of node, which have an OPTIONAL before relation to node.nodeID -