COM.hugin.HAPI
Class NumberedDCNode

java.lang.Object
  extended byCOM.hugin.HAPI.Node
      extended byCOM.hugin.HAPI.DiscreteNode
          extended byCOM.hugin.HAPI.DiscreteChanceNode
              extended byCOM.hugin.HAPI.NumberedDCNode
All Implemented Interfaces:
java.lang.Cloneable

public class NumberedDCNode
extends DiscreteChanceNode

Numbered discrete chance node. Each state of an NumberedDCNode represents a number.


Constructor Summary
NumberedDCNode(NetworkModel belongsTo)
          Constructs a new NumberedDCNode.
 
Method Summary
 int getStateIndex(double value)
          Returns the index of the state matching the specified value.
 double getStateValue(int s)
          Returns the value associated with a particular state of this NumberedDCNode.
 void setStateValue(int s, double v)
          Sets the value associated with a particular state of this NumberedDCNode.
 
Methods inherited from class COM.hugin.HAPI.DiscreteChanceNode
computeSensitivityData, getCategory, getExperienceTable, getFadingTable, hasExperienceTable, hasFadingTable
 
Methods inherited from class COM.hugin.HAPI.DiscreteNode
caseIsSet, enterFinding, generateTable, getBelief, getCaseState, getEnteredFinding, getEntropy, getExpectedUtility, getKind, getMutualInformation, getNumberOfStates, getPropagatedFinding, getSampledState, getSensitivityConstants, getSensitivityConstants, getStateIndex, getStateLabel, retractFindings, selectState, setCaseState, setNumberOfStates, setStateLabel, unsetCase
 
Methods inherited from class COM.hugin.HAPI.Node
addParent, addToInputs, addToOutputs, clone, delete, evidenceIsEntered, evidenceIsPropagated, evidenceToPropagate, getAttribute, getAttributes, getChildren, getDomain, getEdgeConstraint, getHome, getHomeClass, getHomeDomain, getInstance, getJunctionTree, getLabel, getMaster, getModel, getName, getParents, getPosition, getSource, getTable, 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

NumberedDCNode

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

Method Detail

getStateValue

public double getStateValue(int s)
                     throws ExceptionHugin
Returns the value associated with a particular state of this NumberedDCNode.

Parameters:
s - the index of the state in question.
Throws:
ExceptionHugin

getStateIndex

public int getStateIndex(double value)
                  throws ExceptionHugin
Returns the index of the state matching the specified value. If there is no (unique) state with the specified state value, -1 is returned.

Parameters:
value - the state value of the state to be searched for
Returns:
the index of the state with the specified state value.
Throws:
ExceptionHugin

setStateValue

public void setStateValue(int s,
                          double v)
                   throws ExceptionHugin
Sets the value associated with a particular state of this NumberedDCNode.

Parameters:
s - the index of the state in question.
v - the new value for state s.
Throws:
ExceptionHugin