DataType
- Type of data used on the domain of this distribution. For example, a
scalar distribution would have DataType of Double, and a multivariate
distribution would have a DataType of Vector.public interface Distribution<DataType> extends CloneableSerializable
Modifier and Type | Method and Description |
---|---|
DataType |
sample(java.util.Random random)
Draws a single random sample from the distribution.
|
java.util.ArrayList<DataType> |
sample(java.util.Random random,
int numSamples)
Draws multiple random samples from the distribution.
|
void |
sampleInto(java.util.Random random,
int sampleCount,
java.util.Collection<? super DataType> output)
Draws multiple random samples from the distribution and puts the result
into the given collection.
|
clone
DataType sample(java.util.Random random)
random
- Random-number generator to use in order to generate random numbers.java.util.ArrayList<DataType> sample(java.util.Random random, int numSamples)
random
- Random-number generator to use in order to generate random numbers.numSamples
- Number of samples to draw from the distribution.void sampleInto(java.util.Random random, int sampleCount, java.util.Collection<? super DataType> output)
random
- Random number generator to use.sampleCount
- The number of samples to draw. Cannot be negative.output
- The collection to add the samples into.