public abstract class DoubleBinaryOpVertex extends NonProbabilisticDouble
Modifier and Type | Field and Description |
---|---|
protected DoubleVertex |
left |
protected DoubleVertex |
right |
ID_GENERATOR
Constructor and Description |
---|
DoubleBinaryOpVertex(int[] shape,
DoubleVertex left,
DoubleVertex right)
A vertex that performs a user defined operation on two vertices
|
Modifier and Type | Method and Description |
---|---|
DoubleTensor |
getDerivedValue() |
DoubleVertex |
getLeft() |
DoubleVertex |
getRight() |
protected abstract DoubleTensor |
op(DoubleTensor left,
DoubleTensor right) |
DoubleTensor |
sample(KeanuRandom random) |
dLogPdf, isProbabilistic, logPdf, observe, updateValue
abs, acos, asin, atan, atan2, calculateDualNumber, ceil, cos, div, div, divideBy, divideBy, dLogPdf, dLogPdf, exp, floor, getDualNumber, getValue, lambda, log, logPdf, logPdf, matrixMultiply, minus, minus, multiply, multiply, observe, observe, pluck, plus, plus, pow, pow, round, setAndCascade, setAndCascade, setValue, setValue, sigmoid, sin, slice, sum, tan, times, times, unaryMinus
dLogProb, logProb
addChild, addParent, addParents, dLogProbAtValue, equals, eval, getChildren, getConnectedGraph, getId, getParents, getRawValue, getShape, getValue, hashCode, hasValue, isObserved, lazyEval, logProbAtValue, observeOwnValue, sample, setAndCascade, setParents, setParents, setValue, unobserve
protected final DoubleVertex left
protected final DoubleVertex right
public DoubleBinaryOpVertex(int[] shape, DoubleVertex left, DoubleVertex right)
shape
- the shape of the resulting vertexleft
- a vertexright
- a vertexpublic DoubleTensor sample(KeanuRandom random)
sample
in class Vertex<DoubleTensor>
random
- source of randomnesspublic DoubleTensor getDerivedValue()
getDerivedValue
in class NonProbabilisticDouble
protected abstract DoubleTensor op(DoubleTensor left, DoubleTensor right)
public DoubleVertex getLeft()
public DoubleVertex getRight()