ve
Class DecisionNetwork

java.lang.Object
  |
  +--ve.DecisionNetwork

public class DecisionNetwork
extends java.lang.Object

A DecisionNetwork contains a tuple of Variables (each with a domain) and a set of conditional probability tables, each represented as a FactorCPT.


Constructor Summary
DecisionNetwork(java.lang.String s, int maxVariables)
          constructs a decision network from the extended CIspace representation.
 
Method Summary
 int getNumProbFactors()
           
 int getNumVariables()
           
 Factor[] getProbFactors()
          return the conditional probability tables asssociated with the variables.
 java.util.HashMap getStringToVar()
          returns a map from the string to a variable.
 Variable[] getVariables()
          get the variables of the decision network, in order.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DecisionNetwork

public DecisionNetwork(java.lang.String s,
                       int maxVariables)
constructs a decision network from the extended CIspace representation. The extended representation lets us have indexes or names as the parents. It assumes that the names are not numbers (otherwise it assumes they are the indexes).
Parameters:
s - string representation of the decision network
maxVariables - the maximum number of variables allowed
Method Detail

getVariables

public Variable[] getVariables()
get the variables of the decision network, in order. The ordering of indexes to that array should be consistent with the ordering of the variables, but the indexes don't have to coincide with the IDs of the variables. The value getVariables().length does not give the actual number of variables; use getNumVariables to determine the number of variables.

getProbFactors

public Factor[] getProbFactors()
return the conditional probability tables asssociated with the variables. Decision Variables do not have CPTs, so there are generally fewer factors than variables. The value getProbFactors().length does not give the actual number of factors; use getNumProbFactors to determine the number of factors.

getNumVariables

public int getNumVariables()

getNumProbFactors

public int getNumProbFactors()

getStringToVar

public java.util.HashMap getStringToVar()
returns a map from the string to a variable.