Add IntegerPlaceHolderVertex
package io.improbable.keanu.vertices;
import io.improbable.keanu.tensor.dbl.DoubleTensor;
+import io.improbable.keanu.tensor.intgr.IntegerTensor;
import io.improbable.keanu.vertices.dbl.Differentiable;
import io.improbable.keanu.vertices.dbl.DoubleVertex;
import io.improbable.keanu.vertices.dbl.KeanuRandom;
+import io.improbable.keanu.vertices.intgr.IntegerVertex;
import lombok.Builder;
import lombok.Getter;
import lombok.Singular;
@@ -50,4 +52,21 @@ public class LogProbGraph {
return this.getValue();
}
}
+
+ static public class IntegerPlaceHolderVertex extends IntegerVertex implements NonProbabilistic<IntegerTensor>, Differentiable, NonSaveableVertex {
+
+ public IntegerPlaceHolderVertex(long[] initialShape) {
+ super(initialShape);
+ }
+
+ @Override
+ public IntegerTensor calculate() {
+ return this.getValue();
+ }
+
+ @Override
+ public IntegerTensor sample(KeanuRandom random) {
+ return this.getValue();
+ }
+ }
}
