Constructor and Description |
---|
ProbabilityMassSampler(List<ProbabilityMassFunction.Mass<X>> outcomes,
RandomLongGenerator uniformRNG)
Creates an instance with the probable values and an RNG.
|
Modifier and Type | Method and Description |
---|---|
X |
next()
Gets the next random element from the range of the probability distribution.
|
void |
seed(long... seeds)
Seed the random number/vector/scenario generator to produce repeatable experiments.
|
public ProbabilityMassSampler(List<ProbabilityMassFunction.Mass<X>> outcomes, RandomLongGenerator uniformRNG)
outcomes
- the values this distribution can take and their associated probabilitiesuniformRNG
- a uniform random number generatorpublic void seed(long... seeds)
Seedable
public X next()
Copyright © 2010-2020 NM FinTech Ltd.. All Rights Reserved.