Package org.apache.commons.rng.sampling
Interface CompositeSamplers.DiscreteProbabilitySamplerFactory
-
- All Known Implementing Classes:
CompositeSamplers.DiscreteProbabilitySampler
- Enclosing class:
- CompositeSamplers
public static interface CompositeSamplers.DiscreteProbabilitySamplerFactory
A factory for creating a sampler of a user-defined discrete probability distribution.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description DiscreteSampler
create(UniformRandomProvider rng, double[] probabilities)
Creates the sampler.
-
-
-
Method Detail
-
create
DiscreteSampler create(UniformRandomProvider rng, double[] probabilities)
Creates the sampler.- Parameters:
rng
- Source of randomness.probabilities
- Discrete probability distribution.- Returns:
- the sampler
-
-