ve
Class FactorAssign

java.lang.Object
  |
  +--ve.Factor
        |
        +--ve.FactorAssign

public class FactorAssign
extends Factor

This the the class of factors that are the the result of projecting another factor onto some observations.


Inner Class Summary
private  class FactorAssign.Itr
           
 
Field Summary
private  int domainSize
           
private  int domainSizeAfter
           
private  int domainSizeBefore
           
private  Factor fact
           
private  int valAssigned
           
 
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
FactorAssign(Factor f1, Variable var, int val)
          constructs a factor with the given assignment.
 
Method Summary
 EltsIterator iterator()
          Returns an iterator over the values of the factor.
private static Variable[] removeVar(Variable[] vars, Variable var)
          removes a variable from an array of variables in which it appears.
 
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

domainSizeBefore

private int domainSizeBefore

domainSize

private int domainSize

domainSizeAfter

private int domainSizeAfter

valAssigned

private int valAssigned

fact

private Factor fact
Constructor Detail

FactorAssign

public FactorAssign(Factor f1,
                    Variable var,
                    int val)
constructs a factor with the given assignment.
Parameters:
f1 - the factor that is to be updated
var - the variables that is assigned a value. It must appear in f1.
val - the value assigned to var.
Method Detail

iterator

public EltsIterator iterator()
Description copied from class: Factor
Returns an iterator over the values of the factor.
Overrides:
iterator in class Factor

removeVar

private static Variable[] removeVar(Variable[] vars,
                                    Variable var)
removes a variable from an array of variables in which it appears.
Parameters:
vars - an array of variables, in order
var - a variables appearing in vars
Returns:
the array of variables with var removed