COM.hugin.HAPI
Class LabelledDDNode

java.lang.Object
  extended by COM.hugin.HAPI.Node
      extended by COM.hugin.HAPI.DiscreteNode
          extended by COM.hugin.HAPI.DiscreteDecisionNode
              extended by COM.hugin.HAPI.LabelledDDNode
All Implemented Interfaces:
java.lang.Cloneable

public class LabelledDDNode
extends DiscreteDecisionNode

Labelled discrete decision node. This is the kind of DiscreteDecisionNode most oftenly used.


Constructor Summary
LabelledDDNode(DiscreteNode node)
          Constructs a new LabelledDDNode object corresponding to the given DiscreteNode object node.
LabelledDDNode(NetworkModel belongsTo)
          Constructs a new LabelledDDNode.
 
Method Summary
 void reorderStates(java.lang.String[] order)
          Reorders the list of states of this node.
 
Methods inherited from class COM.hugin.HAPI.DiscreteDecisionNode
getCategory, getRequisiteAncestors, getRequisiteParents
 
Methods inherited from class COM.hugin.HAPI.DiscreteNode
caseIsSet, computeExplanationData, computeExplanationData, enterFinding, generateTable, getBelief, getCaseState, getEnteredFinding, getEntropy, getExpectedUtility, getKind, getMutualInformation, getNumberOfStates, getPredictedBelief, getPropagatedFinding, getSampledState, getSensitivityConstants, getSensitivityConstants, getStateIndex, getStateLabel, retractFindings, selectState, setCaseState, setNumberOfStates, setStateLabel, unsetCase
 
Methods inherited from class COM.hugin.HAPI.Node
addParent, addToInputs, addToOutputs, clone, createTemporalClone, delete, evidenceIsEntered, evidenceIsPropagated, evidenceToPropagate, getAttribute, getAttributes, getChildren, getEdgeConstraint, getHome, getHomeClass, getHomeDomain, getInstance, getJunctionTree, getLabel, getMaster, getModel, getName, getParents, getPosition, getSource, getTable, getTemporalClone, getTemporalMaster, getUserData, isAlive, likelihoodIsEntered, likelihoodIsPropagated, removeFromInputs, removeFromOutputs, removeParent, reverseEdge, setAttribute, setAttributes, setEdgeConstraint, setLabel, setName, setPosition, setUserData, switchParent
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LabelledDDNode

public LabelledDDNode(NetworkModel belongsTo)
               throws ExceptionHugin
Constructs a new LabelledDDNode.

Throws:
ExceptionHugin

LabelledDDNode

public LabelledDDNode(DiscreteNode node)
               throws ExceptionHugin
Constructs a new LabelledDDNode object corresponding to the given DiscreteNode object node. (node must be a chance or a decision node.) The new object will be identical to node (that is, same parents, same table, etc.) except for its type.

As a side-effect, the object node dies (that is, becomes "not-alive"). Moreover, all (output and temporal) clones associated with node also die.

Throws:
ExceptionHugin
Method Detail

reorderStates

public void reorderStates(java.lang.String[] order)
                   throws ExceptionHugin
Reorders the list of states of this node. The order list must contain the state labels of this node in the desired order.

In addition to reordering the state labels of this node, the contents of all tables and models containing this node, and case data associated with this node, are updated to match the new ordering of the states.

The states of this node must be uniquely labeled.

Parameters:
order - the new order (which must be a permutation of the current order) of the state labels of this node.
Throws:
ExceptionHugin