DataType
- Type of data that can be sampled from the Distribution.public abstract class AbstractDistribution<DataType> extends AbstractCloneableSerializable implements Distribution<DataType>
Constructor and Description |
---|
AbstractDistribution() |
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.
|
clone
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
sampleInto
clone
public DataType sample(java.util.Random random)
Distribution
sample
in interface Distribution<DataType>
random
- Random-number generator to use in order to generate random numbers.public java.util.ArrayList<DataType> sample(java.util.Random random, int numSamples)
Distribution
sample
in interface Distribution<DataType>
random
- Random-number generator to use in order to generate random numbers.numSamples
- Number of samples to draw from the distribution.