Change uniform int
@@ -9,26 +9,26 @@ import java.util.Random;
public class UniformIntVertex extends ProbabilisticInteger {
- private IntegerVertex min;
- private IntegerVertex max;
+ private Vertex<Integer> min;
+ private Vertex<Integer> max;
private Random random;
/**
* @param min The inclusive lower bound.
* @param max The exclusive upper bound.
*/
- public UniformIntVertex(IntegerVertex min, IntegerVertex max, Random random) {
+ public UniformIntVertex(Vertex<Integer> min, Vertex<Integer> max, Random random) {
this.min = min;
this.max = max;
this.random = random;
setParents(min, max);
}
- public UniformIntVertex(IntegerVertex min, int max, Random random) {
+ public UniformIntVertex(Vertex<Integer> min, int max, Random random) {
this(min, new ConstantIntegerVertex(max), new Random());
}
- public UniformIntVertex(int min, IntegerVertex max, Random random) {
+ public UniformIntVertex(int min, Vertex<Integer> max, Random random) {
this(new ConstantIntegerVertex(min), max, new Random());
}
@@ -36,15 +36,15 @@ public class UniformIntVertex extends ProbabilisticInteger {
this(new ConstantIntegerVertex(min), new ConstantIntegerVertex(max), random);
}
- public UniformIntVertex(IntegerVertex min, IntegerVertex max) {
+ public UniformIntVertex(Vertex<Integer> min, Vertex<Integer> max) {
this(min, max, new Random());
}
- public UniformIntVertex(IntegerVertex min, int max) {
+ public UniformIntVertex(Vertex<Integer> min, int max) {
this(min, new ConstantIntegerVertex(max), new Random());
}
- public UniformIntVertex(int min, IntegerVertex max) {
+ public UniformIntVertex(int min, Vertex<Integer> max) {
this(new ConstantIntegerVertex(min), max, new Random());
}
