public class BoolProxyVertex extends BoolVertex implements ProxyVertex<BoolVertex>, NonProbabilistic<BooleanTensor>
Constructor and Description |
---|
BoolProxyVertex(int[] shape,
VertexLabel label) |
BoolProxyVertex(VertexLabel label)
This vertex acts as a "Proxy" to allow a BayesNet to be built up before parents are explicitly known (ie for
model in model scenarios) but allows linking at a later point in time.
|
Modifier and Type | Method and Description |
---|---|
BooleanTensor |
calculate() |
BoolVertex |
getParent() |
boolean |
hasParent() |
BooleanTensor |
sample(KeanuRandom random) |
void |
setParent(BoolVertex newParent) |
and, concat, equalTo, getValue, not, notEqualTo, observe, observe, or, reshape, setAndCascade, setAndCascade, setValue, setValue, slice, take
addChild, addParent, addParents, equals, eval, getChildren, getConnectedGraph, getId, getIndentation, getLabel, getObservedValue, getParents, getRawValue, getShape, getValue, hashCode, hasValue, isObserved, isProbabilistic, labeledAs, lazyEval, observe, observeOwnValue, sample, setAndCascade, setLabel, setParents, setParents, setValue, toString, unobserve
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
contradictsObservation
getObservedValue, isObserved, observableTypeFor, observe, unobserve
public BoolProxyVertex(VertexLabel label)
label
- The label for this Vertex (all Proxy Vertices must be labelled)public BoolProxyVertex(int[] shape, VertexLabel label)
public BooleanTensor calculate()
calculate
in interface NonProbabilistic<BooleanTensor>
public BooleanTensor sample(KeanuRandom random)
sample
in class Vertex<BooleanTensor>
random
- source of randomnesspublic void setParent(BoolVertex newParent)
setParent
in interface ProxyVertex<BoolVertex>
public BoolVertex getParent()
public boolean hasParent()
hasParent
in interface ProxyVertex<BoolVertex>