T
- the type of the random variate values.public final class VariateBuilder<T>
extends java.lang.Object
T
-type random variate.Constructor and Description |
---|
VariateBuilder() |
Modifier and Type | Method and Description |
---|---|
void |
addArray(T[] values)
Adds the array of values with the default bias.
|
void |
addArray(T[] values,
int bias)
Adds the array of values with the given bias.
|
void |
addCollection(java.util.Collection<T> values)
Adds the collection of values with the default bias.
|
void |
addCollection(java.util.Collection<T> values,
int bias)
Adds the collection of values with the given bias.
|
void |
addInterval(T min,
T max)
Adds an interval with the default bias.
|
void |
addInterval(T min,
T max,
int bias)
Adds an interval with the given bias.
|
void |
addValue(T value)
Adds the value with the default bias.
|
void |
addValue(T value,
int bias)
Adds the value with the given bias.
|
void |
addVariate(Variate<T> variate)
Adds the random variate with the default bias.
|
void |
addVariate(Variate<T> variate,
int bias)
Adds the random variate with the given bias.
|
Variate<T> |
build()
Constructs a random variate.
|
public void addVariate(Variate<T> variate, int bias)
variate
- the random variate to be added.bias
- the bias of the random variate.java.lang.IllegalArgumentException
- if variate == null
;
if bias <= 0
.public void addVariate(Variate<T> variate)
variate
- the random variate to be added.java.lang.IllegalArgumentException
- if variate == null
.public void addValue(T value, int bias)
value
- the value to be added.bias
- the bias of the value.java.lang.IllegalArgumentException
- if bias <= 0
.public void addValue(T value)
value
- the value to be added.public void addInterval(T min, T max, int bias)
min
- the lower bound of the interval.max
- the upper bound of the interval.bias
- the bias of the interval.java.lang.IllegalArgumentException
- if min
or max
is null
;
if bias <= 0
.public void addInterval(T min, T max)
min
- the lower bound of the interval.max
- the upper bound of the interval.public void addArray(T[] values, int bias)
values
- the values to be added.bias
- the bias of the values.java.lang.IllegalArgumentException
- if values == null
; if bias <= 0
.public void addArray(T[] values)
values
- the values to be added.java.lang.IllegalArgumentException
- if values == null
.public void addCollection(java.util.Collection<T> values, int bias)
values
- the values to be added.bias
- the bias of the values.java.lang.IllegalArgumentException
- if values == null
; if bias <= 0
.public void addCollection(java.util.Collection<T> values)
values
- the values to be added.java.lang.IllegalArgumentException
- if values == null
.