|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object
|
+--COM.hugin.HAPI.Node
|
+--COM.hugin.HAPI.InstanceNode
InstanceNodes are the key building block of object-oriented Bayesian networks and influence diagrams.
An InstanceNode represents an instance of a Class (i.e., a Bayesian network or an influence diagram). In other words, an instance node represents a subnetwork. The Class of which InstanceNodes exist in other Classes can itself contain InstanceNodes, whereby an object-oriented network can be viewed as a hierarchical description of a problem domain. Describing a network in a hierarchical fashion often makes the network much less cluttered, and thus provides a much better means of communicating ideas among knowledge engineers and users.
As systems often are composed of collections of identical or similar components, models of systems often contain repetitive patterns. The notion of InstanceNodes makes it very easy to construct multiple identical instances of a network fragment.
An InstanceNode is connected to other nodes via its interface nodes, which are the input Nodes and the output Nodes of the Class of which the InstanceNode is an instance. Chance nodes and decision nodes of the encapsulating Class (i.e., network) as well as output nodes of InstanceNodes of the encapsulating Class can be bound to input nodes of an InstanceNode.
As the output nodes of an InstanceNode can be parents of non-InstanceNodes, these output nodes are represented in the "home Class" of the InstanceNode as clones of the output nodes of the "instance Class" of the InstanceNode. Therefore, the output nodes of InstanceNodes are sometimes referred to as "output clones".
| Constructor Summary | |
InstanceNode(Class home,
Class instanceOf)
Constructs a new InstanceNode. |
|
| Method Summary | |
void |
delete()
Deletes this InstanceNode. |
NetworkModel.Category |
getCategory()
Returns the Category for this InstanceNode. |
Node |
getInput(Node formalInput)
Returns the actual input node associated with a formal input node for this InstanceNode. |
Class |
getInstanceClass()
Returns the instance Class of this InstanceNode (i.e., the Class on which this InstanceNode is based). |
NetworkModel.Kind |
getKind()
Returns the Kind for this InstanceNode. |
Node |
getOutput(Node output)
Returns the output node of this InstanceNode that is a clone of a given output node of the Class from which this InstanceNode has been instantiated. |
NodeList |
getOutputs()
Returns the output nodes (i.e., output clones) of this InstanceNode. |
void |
setInput(Node formalInput,
Node actualInput)
Binds a node to an input node of this InstanceNode. |
void |
unsetInput(Node formalInput)
Unbinds an input node of this InstanceNode. |
| Methods inherited from class COM.hugin.HAPI.Node |
addParent,
addToInputs,
addToOutputs,
evidenceIsEntered,
evidenceIsPropagated,
evidenceToPropagate,
getAttribute,
getAttributes,
getChildren,
getDomain,
getEdgeConstraint,
getHome,
getHomeClass,
getHomeDomain,
getInstance,
getJunctionTree,
getLabel,
getMaster,
getModel,
getName,
getParents,
getPosition,
getSource,
getUserData,
likelihoodIsEntered,
likelihoodIsPropagated,
removeFromInputs,
removeFromOutputs,
removeParent,
reverseEdge,
setAttribute,
setEdgeConstraint,
setLabel,
setName,
setPosition,
setUserData |
| Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Constructor Detail |
public InstanceNode(Class home,
Class instanceOf)
throws ExceptionArgumentNotAlive,
ExceptionHugin
home - the home Class of the new InstanceNode.instanceClass - the Class from which to instantiate the
new InstanceNode.| Method Detail |
public NetworkModel.Category getCategory()
throws ExceptionObjectNotAlive
public NetworkModel.Kind getKind()
throws ExceptionObjectNotAlive
public Node getOutput(Node output)
throws ExceptionObjectNotAlive,
ExceptionHugin
output - the output node of the Class from which this
InstanceNode has been instantiated.
public NodeList getOutputs()
throws ExceptionObjectNotAlive,
ExceptionHugin
public void setInput(Node formalInput,
Node actualInput)
throws ExceptionObjectNotAlive,
ExceptionHugin
formalInput - the formal input node of this
InstanceNode. This node is to be considered a placeholder for
the 'actualInput'.actualInput - the actual input node to be bound to
'formalInput'. This node must belong to the same Class as this
InstanceNode.
public void unsetInput(Node formalInput)
throws ExceptionObjectNotAlive,
ExceptionHugin
formalInput - the input node to become unbound.
public Node getInput(Node formalInput)
throws ExceptionObjectNotAlive,
ExceptionHugin
formalInput - The formal input node of this
InstanceNode.
public Class getInstanceClass()
throws ExceptionObjectNotAlive,
ExceptionHugin
public void delete()
throws ExceptionObjectNotAlive,
ExceptionHugin
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||