ve
Class BeliefNetwork
java.lang.Object
|
+--ve.BeliefNetwork
- Direct Known Subclasses:
- BeliefNetFromCBN
- public class BeliefNetwork
- extends java.lang.Object
A BeliefNetwork contains a tuple of Variables (each with a domain)
and a set of conditional probability tables, here represented as a
FactorCPT
.
Constructor Summary |
BeliefNetwork(java.lang.String s,
int maxVariables)
constructs a belief network from the extended CIspace
representation. |
BeliefNetwork(Variable[] vars,
int numVars)
constructs a belief network for the corresponding variables |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
probFactors
protected Factor[] probFactors
- The conditional probability tables asssociated with the
variables. The factor associated with probabilityFactors[i]
represents the conditional probability table of variables[i].
numVariables
protected int numVariables
BeliefNetwork
public BeliefNetwork(java.lang.String s,
int maxVariables)
- constructs a belief 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 belief networkmaxVariables
- the maximum number of variables allowed
BeliefNetwork
public BeliefNetwork(Variable[] vars,
int numVars)
- constructs a belief network for the corresponding variables
getVariables
public Variable[] getVariables()
- get the variables of the belief 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 variable.length does not give the
actual number of variables; use getNumVariables to determine
the number of variables.
getProbFactors
public Factor[] getProbFactors()
- return the conditiona probability tables asssociates with the
variables. The factor associated with probabilityFactors[i]
represents the conditional probability table of variables[i].
getNumVariables
public int getNumVariables()
getStringToVar
public java.util.HashMap getStringToVar()
- returns the map from the string name to the variable.
print
public void print()
- Prints the belief network