|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object blog.DerivedVar
public class DerivedVar
A random variable whose value is a deterministic function of some basic variables. In this default implementation, the DerivedVar's value is given by some ArgSpec.
Field Summary | |
---|---|
protected ArgSpec |
argSpec
|
Constructor Summary | |
---|---|
DerivedVar(ArgSpec argSpec)
Creates a new DerivedVar whose value is given by argSpec . |
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. |
ArgSpec |
getArgSpec()
Returns the ArgSpec that determines this variable's value. |
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(EvalContext context)
Returns the value of this random variable in the given context. |
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. |
java.lang.String |
toString()
Returns the string representation of this derived variable's ArgSpec. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected ArgSpec argSpec
Constructor Detail |
---|
public DerivedVar(ArgSpec argSpec)
argSpec
.
Method Detail |
---|
public ArgSpec getArgSpec()
public boolean isDetermined(PartialWorld w)
BayesNetVar
isDetermined
in interface BayesNetVar
public java.lang.Object getValue(PartialWorld w)
getValue
in interface BayesNetVar
public java.lang.Object getValue(EvalContext context)
public java.util.Set getParents(PartialWorld w)
BayesNetVar
getParents
in interface BayesNetVar
public BasicVar getFirstUninstParent(PartialWorld w)
BayesNetVar
getFirstUninstParent
in interface BayesNetVar
public void ensureDetAndSupported(InstantiatingEvalContext instantiator)
BayesNetVar
ensureDetAndSupported
in interface BayesNetVar
public Timestep timestep()
BayesNetVar
timestep
in interface BayesNetVar
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |