public class AssertVertex extends BooleanVertex implements NonProbabilistic<BooleanTensor>
Constructor and Description |
---|
AssertVertex(Vertex<? extends BooleanTensor> predicate) |
AssertVertex(Vertex<? extends BooleanTensor> predicate,
java.lang.String errorMessage)
A vertex that asserts a
BooleanVertex is all true on calculation. |
Modifier and Type | Method and Description |
---|---|
BooleanTensor |
calculate() |
java.lang.String |
getErrorMessage() |
Vertex<? extends BooleanTensor> |
getPredicate() |
and, and, and, assertTrue, assertTrue, concat, equalTo, getValue, loadValue, not, not, notEqualTo, observe, observe, or, or, or, reshape, saveValue, setAndCascade, setAndCascade, setValue, setValue, slice, take
addChild, addParent, addParents, equals, eval, getChildren, getConnectedGraph, getDegree, getId, getIndentation, getLabel, getObservedValue, getParents, getRank, getReference, getShape, getState, getValue, hashCode, hasValue, isDifferentiable, isObserved, isProbabilistic, lazyEval, observe, observeOwnValue, print, print, removeLabel, save, setAndCascade, setLabel, setLabel, setParents, setParents, setState, setValue, toString, unobserve
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
contradictsObservation
getObservedValue, isObserved, observe, unobserve
public AssertVertex(Vertex<? extends BooleanTensor> predicate, java.lang.String errorMessage)
BooleanVertex
is all true on calculation.predicate
- the predicate to evaluateerrorMessage
- a message to include in the AssertionError
java.lang.AssertionError
- if any element of the predicate is false when calculated.public AssertVertex(Vertex<? extends BooleanTensor> predicate)
public BooleanTensor calculate()
calculate
in interface NonProbabilistic<BooleanTensor>
public Vertex<? extends BooleanTensor> getPredicate()
public java.lang.String getErrorMessage()