ve
Class FactorSumOut
java.lang.Object
|
+--ve.Factor
|
+--ve.FactorStored
|
+--ve.FactorSumOut
- public class FactorSumOut
- extends FactorStored
This the the class of factors that are created by summing out a set
of variables from another factor.
Copyright 2001, David Poole. All rights reserved.
Fields inherited from class ve.Factor |
BY_ASSIGN, BY_CPT, BY_DETERMINISTIC, BY_EXPANDING, BY_GENRULE, BY_MAXIMIZING, BY_MULTIPLYING, BY_NORMALIZING, BY_OBSERVED, BY_PLUS, BY_REORDERING, BY_SAVEIT, BY_SUM_OUT, BY_UNIFORM, BY_UPDATABLE, BY_V_ELIM, howCreatedVal, savingForTracing, thesize, variables |
Methods inherited from class ve.Factor |
allOnes, contains, display, getName, getSavingForTracing, getVariables, howCreated, isRedundant, isRedundant, print, print, printVariables, setSavingForTracing, size, toString |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait |
theFactor
private Factor theFactor
- the factor that the variable is being summed out from
theVariables
private Variable[] theVariables
- the variables being summed out
FactorSumOut
public FactorSumOut(Factor f1,
Variable[] vars)
- constructs a factor with the given variables.
- Parameters:
f1
- the original factor.vars
- the list of variables to be summed out. This
assumes that vars is a subset of f1.getVariables().
setDiff
public static Variable[] setDiff(Variable[] vars1,
Variable[] vars2)
- returns the array representing the set difference of the variables.
- Parameters:
vars1
- an ordered list of variables.vars2
- an ordered list of variables.- Returns:
- the elements of vars1 not in vars2.
getTheFactor
public Factor getTheFactor()
- returns the factor that the variable is being summed out from
getTheVariables
public Variable[] getTheVariables()
- returns the variables being summed out