public abstract class BoolBinaryOpVertex<A extends Tensor,B extends Tensor> extends BoolVertex implements NonProbabilistic<BooleanTensor>
Modifier and Type | Field and Description |
---|---|
protected Vertex<A> |
a |
protected Vertex<B> |
b |
ID_GENERATOR
Constructor and Description |
---|
BoolBinaryOpVertex(int[] shape,
Vertex<A> a,
Vertex<B> b) |
BoolBinaryOpVertex(Vertex<A> a,
Vertex<B> b) |
Modifier and Type | Method and Description |
---|---|
BooleanTensor |
calculate() |
boolean |
contradictsObservation() |
protected abstract BooleanTensor |
op(A l,
B r) |
BooleanTensor |
sample(KeanuRandom random) |
and, equalTo, getValue, not, notEqualTo, observe, observe, or, setAndCascade, setAndCascade, setValue, setValue, slice, take
addChild, addParent, addParents, equals, eval, getChildren, getConnectedGraph, getId, getLabel, getObservedValue, getParents, getRawValue, getShape, getValue, hashCode, hasValue, isObserved, isProbabilistic, lazyEval, observe, observeOwnValue, sample, setAndCascade, setLabel, setParents, setParents, setValue, unobserve
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
getObservedValue, isObserved, observableTypeFor, observe, unobserve
public BooleanTensor sample(KeanuRandom random)
sample
in class Vertex<BooleanTensor>
random
- source of randomnesspublic boolean contradictsObservation()
contradictsObservation
in interface NonProbabilistic<BooleanTensor>
public BooleanTensor calculate()
calculate
in interface NonProbabilistic<BooleanTensor>
protected abstract BooleanTensor op(A l, B r)