blog
Interface BayesNetVar

All Known Implementing Classes:
BasicVar, DerivedVar, NumberVar, OriginVar, RandFuncAppVar, VarWithDistrib

public interface BayesNetVar

A random variable that serves as a node in a Bayes net (directed graphical model).


Method Summary
 void ensureDetAndSupported(InstantiatingEvalContext instantiator)
          Ensures that the partial world underlying the given InstantiatingEvalContext is complete enough to determine the value of this variable and to determine its probability distribution conditional on its parents.
 BasicVar getFirstUninstParent(PartialWorld w)
          Returns the first parent of this variable that is uninstantiated in the given partial world.
 java.util.Set getParents(PartialWorld w)
          Returns the set of parents of this variable in the given partial world.
 java.lang.Object getValue(PartialWorld w)
          Returns the value of this random variable in the given world.
 boolean isDetermined(PartialWorld w)
          Returns true if the given world is complete enough to determine the value of this random variable.
 Timestep timestep()
          Returns the timestep that this variable is associated with, or null if it is atemporal.
 

Method Detail

isDetermined

boolean isDetermined(PartialWorld w)
Returns true if the given world is complete enough to determine the value of this random variable.


getValue

java.lang.Object getValue(PartialWorld w)
Returns the value of this random variable in the given world.

Throws:
java.lang.IllegalArgumentException - if the given partial world is not complete enough to determine the value of this variable

getParents

java.util.Set getParents(PartialWorld w)
Returns the set of parents of this variable in the given partial world. The parents are those random variables which, if they changed, could change the probability of this variable having a given value. This method yields a fatal error if the partial world is not complete enough to determine this variable's parents.

Returns:
Set of BayesNetVar

getFirstUninstParent

BasicVar getFirstUninstParent(PartialWorld w)
Returns the first parent of this variable that is uninstantiated in the given partial world. This method uses a decision tree view of the variable's CPD; it walks down the tree until it reaches a node corresponding to an uninstantiated variable. If all of this variable's active parents in the given partial world are instantiated, then this method returns null.


ensureDetAndSupported

void ensureDetAndSupported(InstantiatingEvalContext instantiator)
Ensures that the partial world underlying the given InstantiatingEvalContext is complete enough to determine the value of this variable and to determine its probability distribution conditional on its parents.


timestep

Timestep timestep()
Returns the timestep that this variable is associated with, or null if it is atemporal.