ve
Class Query
java.lang.Object
|
+--ve.Query
- public class Query
- extends java.lang.Object
a factor that is the result of a query.
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
result
private Factor result
normresult
private Factor normresult
eo
private Variable[] eo
maxFactorSize
private int maxFactorSize
Query
public Query(Variable[] queryVars,
DecisionNetwork dnet,
Variable[] observedVars,
int[] observedVals,
java.lang.String how)
- constructs the factor that answers the specific query.
- Parameters:
queryVars
- the array of variables being queried. These
are assumed to be in order and must be a subset of the
variables in bnet.bnet
- a belief network.observedVars
- the array of variables that have observed
values. These are assumed to be in order and must be a subset
of the variables in bnet.ObservedVals
- the array of values for the corresponding
observed values. Each value ObservedVals[i] is the index into
ObservedVars[i].domain.
Query
public Query(Variable[] queryVars,
DecisionNetwork dnet,
Variable[] observedVars,
int[] observedVals,
Variable[] neweo)
getResult
public Factor getResult()
- gets the result of the query.
getUnNormResult
public Factor getUnNormResult()
getEO
public Variable[] getEO()
getMaxFactorSize
public int getMaxFactorSize()
determineToSumOut
private Variable[] determineToSumOut(Variable[] allVars,
int numVars,
Variable[] queryVars,
Variable[] observedVars)
shuffle
private void shuffle(Variable[] vars)