类 AliasMethod
- java.lang.Object
-
- dev.utils.common.random.AliasMethod
-
-
构造器概要
构造器 构造器 说明 AliasMethod(java.util.List<java.lang.Double> probabilities)Constructs a new AliasMethod to sample from a discrete distribution and hand back outcomes based on the probability distribution.AliasMethod(java.util.List<java.lang.Double> probabilities, java.util.Random random)Constructs a new AliasMethod to sample from a discrete distribution and hand back outcomes based on the probability distribution.
-
-
-
构造器详细资料
-
AliasMethod
public AliasMethod(java.util.List<java.lang.Double> probabilities)
Constructs a new AliasMethod to sample from a discrete distribution and hand back outcomes based on the probability distribution.Given as input a list of probabilities corresponding to outcomes 0, 1, ..., n - 1, this constructor creates the probability and alias tables needed to efficiently sample from this distribution.
- 参数:
probabilities- The list of probabilities.
-
AliasMethod
public AliasMethod(java.util.List<java.lang.Double> probabilities, java.util.Random random)Constructs a new AliasMethod to sample from a discrete distribution and hand back outcomes based on the probability distribution.Given as input a list of probabilities corresponding to outcomes 0, 1, ..., n - 1, along with the random number generator that should be used as the underlying generator, this constructor creates the probability and alias tables needed to efficiently sample from this distribution.
- 参数:
probabilities- The list of probabilities.random- The random number generator
-
-