CausalNet.Factory
Modifier and Type | Field and Description |
---|---|
protected CNetNode |
endNode
The endNode of the CNet;
|
protected java.util.Map<CNetNode,java.util.Set<CNetBinding>> |
inputBindings
The input bindings in the CNet
|
protected java.lang.String |
label
label of the CNet
|
protected java.util.Set<CNetNode> |
nodes
The nodes in this CNet
|
protected java.util.Map<CNetNode,java.util.Set<CNetBinding>> |
outputBindings
The output bindings in the CNet
|
protected CNetNode |
startNode
The startNode of the CNet
|
Constructor and Description |
---|
CNet(java.lang.String label) |
Modifier and Type | Method and Description |
---|---|
CNetBinding |
addInputBinding(CNetNode node,
CNetNode... nodes)
Add an input binding
|
CNetBinding |
addInputBinding(CNetNode node,
java.util.Collection<? extends CNetNode> nodes)
Add an input binding
|
CNetNode |
addNode(CNetNode node)
Add a node
|
CNetBinding |
addOutputBinding(CNetNode node,
CNetNode... nodes)
Add an output binding
|
CNetBinding |
addOutputBinding(CNetNode node,
java.util.Collection<? extends CNetNode> nodes)
Add an output binding
|
java.util.Set<CNetBinding> |
getBindings()
Returns the bindings of this net
|
java.util.Set<CNetBinding> |
getBindings(CNetNode node)
Returns the bindings of the given node
|
CNetNode |
getEndNode() |
java.util.Set<CNetBinding> |
getInputBindings()
Returns the input bindings of this net
|
java.util.Set<CNetBinding> |
getInputBindings(CNetNode node)
Returns the input bindings of the given node
|
java.lang.String |
getLabel() |
java.util.Set<CNetNode> |
getNodes() |
java.util.Set<CNetBinding> |
getOutputBindings()
Returns the output bindings of this net
|
java.util.Set<CNetBinding> |
getOutputBindings(CNetNode node)
Returns the output bindings of the given node
|
java.util.Set<CNetNode> |
getPredecessors(CNetNode node)
Returns the predecessors of a CNet node, i.e.
|
CNetNode |
getStartNode() |
java.util.Set<CNetNode> |
getSuccessors(CNetNode node)
Returns the successors of a CNet node, i.e.
|
boolean |
isConsistent()
check if this cnet is consistent with the formal definitions:
- one start node
- one end node
- dependencies between nodes are reflected in input/output bindings
* @return
|
void |
removeBinding(CNetBinding binding)
removes a binding
|
void |
removeNode(CNetNode node)
Remove a node
|
void |
setEndNode(CNetNode endNode) |
void |
setStartNode(CNetNode startNode) |
java.lang.String |
toString()
Print the current CNet
|
protected final java.lang.String label
protected final java.util.Set<CNetNode> nodes
protected final java.util.Map<CNetNode,java.util.Set<CNetBinding>> inputBindings
protected final java.util.Map<CNetNode,java.util.Set<CNetBinding>> outputBindings
protected CNetNode startNode
protected CNetNode endNode
public boolean isConsistent()
public java.lang.String getLabel()
public java.util.Set<CNetNode> getNodes()
public CNetNode getStartNode()
getStartNode
in interface CausalNet
public void setStartNode(CNetNode startNode)
startNode
- the startNode to setpublic CNetNode getEndNode()
getEndNode
in interface CausalNet
public void setEndNode(CNetNode endNode)
endNode
- the endNode to setpublic void removeNode(CNetNode node)
node
- public CNetBinding addInputBinding(CNetNode node, CNetNode... nodes)
node
- public CNetBinding addOutputBinding(CNetNode node, CNetNode... nodes)
node
- public CNetBinding addInputBinding(CNetNode node, java.util.Collection<? extends CNetNode> nodes)
node
- public CNetBinding addOutputBinding(CNetNode node, java.util.Collection<? extends CNetNode> nodes)
node
- public void removeBinding(CNetBinding binding)
binding
- public java.util.Set<CNetBinding> getInputBindings(CNetNode node)
getInputBindings
in interface CausalNet
node
- public java.util.Set<CNetBinding> getOutputBindings(CNetNode node)
getOutputBindings
in interface CausalNet
node
- public java.util.Set<CNetBinding> getBindings(CNetNode node)
node
- public java.util.Set<CNetBinding> getInputBindings()
node
- public java.util.Set<CNetBinding> getOutputBindings()
node
- public java.util.Set<CNetBinding> getBindings()
node
- public java.util.Set<CNetNode> getSuccessors(CNetNode node)
getSuccessors
in interface CausalNet
node
- public java.util.Set<CNetNode> getPredecessors(CNetNode node)
getPredecessors
in interface CausalNet
node
- public java.lang.String toString()
toString
in class java.lang.Object