ve
Class FactorMax

java.lang.Object
  |
  +--ve.Factor
        |
        +--ve.FactorStored
              |
              +--ve.FactorMax

public class FactorMax
extends FactorStored

This the the class of factors that are created by optimizing a decision variable. It is only used if the factor being optimized contains a decision variable, all of the other variables are parents of the decision variable and it is a utility factor. Copyright 2001, David Poole. All rights reserved.


Inner classes inherited from class ve.FactorStored
FactorStored.Itr
 
Field Summary
private  FactorDeterministic policyFunction
           
 
Fields inherited from class ve.FactorStored
factorValues
 
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
 
Constructor Summary
FactorMax(Factor f1, Variable var)
          constructs a factor with the given variables.
 
Method Summary
 FactorDeterministic getPolicyFunction()
          returns an array of value index for the part of the optimal policy for this decision node.
static Variable[] remove(Variable[] vars1, Variable var)
          returns the array representing the set difference of the variables.
 
Methods inherited from class ve.FactorStored
iterator
 
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
 

Field Detail

policyFunction

private FactorDeterministic policyFunction
Constructor Detail

FactorMax

public FactorMax(Factor f1,
                 Variable var)
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().
Method Detail

getPolicyFunction

public FactorDeterministic getPolicyFunction()
returns an array of value index for the part of the optimal policy for this decision node.

remove

public static Variable[] remove(Variable[] vars1,
                                Variable var)
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.