T
- the type of the random variate values.public final class VariateBiased<T> extends java.lang.Object implements Variate<T>
T
-type random variate (a discrete probability
distribution).Constructor and Description |
---|
VariateBiased(java.util.List<T> values,
java.util.List<java.lang.Integer> biases)
Constructs a biased random variate.
|
VariateBiased(T[] values,
int[] biases)
Constructs a biased random variate.
|
public VariateBiased(java.util.List<T> values, java.util.List<java.lang.Integer> biases)
values
- the value area of the random variate.biases
- the random biases of the values.java.lang.IllegalArgumentException
- if values == null
or biases == null
;
if the values
and biases
arrays have different sizes
or they are empty or the biases
array contains negative numbers.public VariateBiased(T[] values, int[] biases)
values
- the value area of the random variate.biases
- the random biases of the values.java.lang.IllegalArgumentException
- if values == null
or biases == null
;
if the values
and biases
arrays have different sizes
or they are empty or the biases
array contains negative numbers.