ve
Class DecisionNetwork

java.lang.Object
  |
  +--ve.DecisionNetwork
Direct Known Subclasses:
BeliefNetworkFromThreshold, DecisionNetworkFromBIF, DecisionNetworkFromCIspaceFormat

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.


Field Summary
protected  int maxDomainSize
          the maximum domain size in an input factor.
protected  int maxFactorSize
          maximum number of variables in an input factor.
protected  int numProbFactors
           
protected  int numVariables
           
protected  Factor[] probFactors
          factors representing conditional probability tables asssociates with the variables.
protected  java.util.Hashtable stringToVar
          maps the string name to the variable.
protected  Variable[] variables
          The variables of the decision network, in order.
 
Constructor Summary
protected DecisionNetwork()
           
  DecisionNetwork(Variable[] vars, int numVars)
           
 
Method Summary
 int getNumProbFactors()
           
 int getNumVariables()
           
 Factor[] getProbFactors()
          return the conditional probability tables asssociated with the variables.
 int getSize()
          returns the number of paramters in the decision network.
 java.util.Hashtable getStringToVar()
          returns a map from the string to a variable.
 Variable[] getVariables()
          get the variables of the decision network, in order.
protected static void mysort(Variable[] vars)
           
 void print()
          Prints the belief network
 void printBrief()
          Prints a summary of the belief network
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

variables

protected Variable[] variables
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 variables.length does not give the actual number of variables; use getNumVariables() to determine the number of variables.

probFactors

protected Factor[] probFactors
factors representing conditional probability tables asssociates with the variables. Decision Variables do not have CPTs, so there are generally fewer factors than variables.

numVariables

protected int numVariables

numProbFactors

protected int numProbFactors

maxDomainSize

protected final int maxDomainSize
the maximum domain size in an input factor.

maxFactorSize

protected final int maxFactorSize
maximum number of variables in an input factor.

stringToVar

protected java.util.Hashtable stringToVar
maps the string name to the variable.
Constructor Detail

DecisionNetwork

protected DecisionNetwork()

DecisionNetwork

public DecisionNetwork(Variable[] vars,
                       int numVars)
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.Hashtable getStringToVar()
returns a map from the string to a variable.

print

public void print()
Prints the belief network

printBrief

public void printBrief()
Prints a summary of the belief network

getSize

public int getSize()
returns the number of paramters in the decision network.

mysort

protected static void mysort(Variable[] vars)