Mark the ConstantInt as Saveable
@@ -2,12 +2,15 @@ package io.improbable.keanu.vertices.intgr.nonprobabilistic;
import io.improbable.keanu.annotation.ExportVertexToPythonBindings;
+import io.improbable.keanu.network.NetworkWriter;
import io.improbable.keanu.tensor.intgr.IntegerTensor;
+import io.improbable.keanu.vertices.ConstantVertex;
import io.improbable.keanu.vertices.NonProbabilistic;
+import io.improbable.keanu.vertices.SaveableVertex;
import io.improbable.keanu.vertices.dbl.KeanuRandom;
import io.improbable.keanu.vertices.intgr.IntegerVertex;
-public class ConstantIntegerVertex extends IntegerVertex implements NonProbabilistic<IntegerTensor> {
+public class ConstantIntegerVertex extends IntegerVertex implements ConstantVertex, SaveableVertex, NonProbabilistic<IntegerTensor> {
@ExportVertexToPythonBindings
public ConstantIntegerVertex(IntegerTensor constant) {
@@ -28,6 +31,11 @@ public class ConstantIntegerVertex extends IntegerVertex implements NonProbabili
return getValue();
}
+ @Override
+ public void save(NetworkWriter netWriter) {
+ netWriter.save(this);
+ }
+
@Override
public IntegerTensor calculate() {
return getValue();
