Package ru.ispras.fortress.randomizer
Class VariateBiased<T>
- java.lang.Object
-
- ru.ispras.fortress.randomizer.VariateBiased<T>
-
-
Constructor Summary
Constructors Constructor 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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
value()
Returns a value (instance) of the random variate.
-
-
-
Constructor Detail
-
VariateBiased
public VariateBiased(java.util.List<T> values, java.util.List<java.lang.Integer> biases)
Constructs a biased random variate.- Parameters:
values
- the value area of the random variate.biases
- the random biases of the values.- Throws:
java.lang.IllegalArgumentException
- ifvalues == null
orbiases == null
; if thevalues
andbiases
arrays have different sizes or they are empty or thebiases
array contains negative numbers.
-
VariateBiased
public VariateBiased(T[] values, int[] biases)
Constructs a biased random variate.- Parameters:
values
- the value area of the random variate.biases
- the random biases of the values.- Throws:
java.lang.IllegalArgumentException
- ifvalues == null
orbiases == null
; if thevalues
andbiases
arrays have different sizes or they are empty or thebiases
array contains negative numbers.
-
-