Package org.apache.commons.rng.sampling
Enum CompositeSamplers.DiscreteProbabilitySampler
java.lang.Object
java.lang.Enum<CompositeSamplers.DiscreteProbabilitySampler>
org.apache.commons.rng.sampling.CompositeSamplers.DiscreteProbabilitySampler
- All Implemented Interfaces:
Serializable
,Comparable<CompositeSamplers.DiscreteProbabilitySampler>
,java.lang.constant.Constable
,CompositeSamplers.DiscreteProbabilitySamplerFactory
- Enclosing class:
CompositeSamplers
public static enum CompositeSamplers.DiscreteProbabilitySampler
extends Enum<CompositeSamplers.DiscreteProbabilitySampler>
implements CompositeSamplers.DiscreteProbabilitySamplerFactory
The DiscreteProbabilitySampler class defines implementations that sample from a user-defined
discrete probability distribution.
All implementations support the SharedStateDiscreteSampler
interface.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionSample using the alias method (seeAliasMethodDiscreteSampler
).Sample using a guide table (seeGuideTableDiscreteSampler
).Sample using an optimised look-up table (seeMarsagliaTsangWangDiscreteSampler.Enumerated
). -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the enum constant of this type with the specified name.values()
Returns an array containing the constants of this enum type, in the order they are declared.Methods inherited from class java.lang.Enum
clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
Methods inherited from interface org.apache.commons.rng.sampling.CompositeSamplers.DiscreteProbabilitySamplerFactory
create
-
Enum Constant Details
-
GUIDE_TABLE
Sample using a guide table (seeGuideTableDiscreteSampler
). -
ALIAS_METHOD
Sample using the alias method (seeAliasMethodDiscreteSampler
). -
LOOKUP_TABLE
Sample using an optimised look-up table (seeMarsagliaTsangWangDiscreteSampler.Enumerated
).
-
-
Constructor Details
-
DiscreteProbabilitySampler
private DiscreteProbabilitySampler()
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-