ve
Class FactorObserved

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

public class FactorObserved
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 FactorObserved.Itr
           
 
Field Summary
private  int[] domainSizeBetween
           
private  int[] domainSizeObserved
           
private  Factor fact
           
private  int numObsBlocks
           
private  int[] valsObserved
           
 
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
FactorObserved(Factor f1, Variable[] observedVars, int[] observedVals)
          constructs a factor with the given obsevations.
 
Method Summary
 EltsIterator iterator()
          Returns an iterator over the values of the factor.
 
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

domainSizeObserved

private int[] domainSizeObserved

valsObserved

private int[] valsObserved

domainSizeBetween

private int[] domainSizeBetween

numObsBlocks

private int numObsBlocks

fact

private Factor fact
Constructor Detail

FactorObserved

public FactorObserved(Factor f1,
                      Variable[] observedVars,
                      int[] observedVals)
constructs a factor with the given obsevations.
Parameters:
f1 - the factor that is to be updated
observedVars - the array of variables that have observed values. These are assumed to be in order. They do not necessarily appear in f1.
ObservedVals - the array of values for the corresponding observed values. Each value ObservedVals[i] is the index into ObservedVars[i].getDomain().
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