DataType
- Type of data to sample.public class DirectSampler<DataType> extends AbstractCloneableSerializable implements MonteCarloSampler<DataType,DataType,ProbabilityFunction<DataType>>
Constructor and Description |
---|
DirectSampler()
Creates a new instance of DirectSampler
|
Modifier and Type | Method and Description |
---|---|
java.util.ArrayList<? extends DataType> |
sample(ProbabilityFunction<DataType> targetFunction,
java.util.Random random,
int numSamples)
Draws samples according to the distribution of the target function.
|
clone
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
clone
public java.util.ArrayList<? extends DataType> sample(ProbabilityFunction<DataType> targetFunction, java.util.Random random, int numSamples)
MonteCarloSampler
sample
in interface MonteCarloSampler<DataType,DataType,ProbabilityFunction<DataType>>
targetFunction
- Target function that we want to generate samples.random
- Random-number generator.numSamples
- Number of samples to generate.