COM.hugin.HAPI
Interface NumericDiscreteNode

All Known Implementing Classes:
IntervalDCNode, IntervalDDNode, IntervalDFNode, NumberedDCNode, NumberedDDNode, NumberedDFNode

public interface NumericDiscreteNode

The NumericDiscreteNode interface declares the common methods for the NumberedDCNode, NumberedDDNode, IntervalDCNode, and IntervalDDNode classes.


Method Summary
 double getQuantile(double probability)
          Returns the quantile corresponding to the specified probability argument of the inverse cumulative distribution function.
 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 the node.
 void setStateValue(int s, double v)
          Sets the value associated with a particular state of the node.
 

Method Detail

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

getStateValue

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

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

setStateValue

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

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

getQuantile

public double getQuantile(double probability)
                   throws ExceptionHugin
Returns the quantile corresponding to the specified probability argument of the inverse cumulative distribution function.

Throws:
ExceptionHugin