add toDouble to IntegerVertex.
@@ -14,6 +14,8 @@ import io.improbable.keanu.vertices.bool.nonprobabilistic.operators.binary.compa
import io.improbable.keanu.vertices.bool.nonprobabilistic.operators.binary.compare.LessThanOrEqualVertex;
import io.improbable.keanu.vertices.bool.nonprobabilistic.operators.binary.compare.LessThanVertex;
import io.improbable.keanu.vertices.bool.nonprobabilistic.operators.binary.compare.NotEqualsVertex;
+import io.improbable.keanu.vertices.dbl.DoubleVertex;
+import io.improbable.keanu.vertices.dbl.nonprobabilistic.CastDoubleVertex;
import io.improbable.keanu.vertices.intgr.nonprobabilistic.CastIntegerVertex;
import io.improbable.keanu.vertices.intgr.nonprobabilistic.ConstantIntegerVertex;
import io.improbable.keanu.vertices.intgr.nonprobabilistic.operators.binary.IntegerAdditionVertex;
@@ -179,6 +181,10 @@ public abstract class IntegerVertex extends Vertex<IntegerTensor> implements Int
return new EqualsVertex<>(this, rhs);
}
+ public DoubleVertex toDouble() {
+ return new CastDoubleVertex(this);
+ }
+
public <T extends Tensor> BoolVertex notEqualTo(Vertex<T> rhs) {
return new NotEqualsVertex<>(this, rhs);
}
