Uses of Interface
org.apache.commons.rng.UniformRandomProvider
-
Packages that use UniformRandomProvider Package Description org.apache.commons.rng This package contains the library's interface to be used by client code that needs a generator of sequences of pseudo-random numbers that are uniformly distributed in a specified range.org.apache.commons.rng.core Base classes for thegeneration of uniformly distributed random numbers
.org.apache.commons.rng.core.source32 Concrete algorithms forint
-based sources of randomness.org.apache.commons.rng.core.source64 Concrete algorithms forlong
-based sources of randomness.org.apache.commons.rng.core.util This package contains utilities to combine/split primitive types.org.apache.commons.rng.sampling This package provides sampling utilities.org.apache.commons.rng.sampling.distribution This package contains classes for sampling from statistical distributions.org.apache.commons.rng.sampling.shape This package contains classes for sampling coordinates from shapes, for example a unit ball.org.apache.commons.rng.simple This package providesfactory methods
by which low-level classes implemented in module "commons-rng-core" are instantiated.org.apache.commons.rng.simple.internal Utilities for seed conversion. -
-
Uses of UniformRandomProvider in org.apache.commons.rng
Subinterfaces of UniformRandomProvider in org.apache.commons.rng Modifier and Type Interface Description interface
JumpableUniformRandomProvider
Applies to generators that can be advanced a large number of steps of the output sequence in a single operation.interface
LongJumpableUniformRandomProvider
Applies to generators that can be advanced a very large number of steps of the output sequence in a single operation.interface
RestorableUniformRandomProvider
Applies to generators whose internal state can be saved and restored.interface
SplittableUniformRandomProvider
Applies to generators that can be split into two objects (the original and a new instance) each of which implements the same interface (and can be recursively split indefinitely).Methods in org.apache.commons.rng that return UniformRandomProvider Modifier and Type Method Description UniformRandomProvider
JumpableUniformRandomProvider. jump()
Creates a copy of the UniformRandomProvider and then advances the state of the current instance.Methods in org.apache.commons.rng that return types with arguments of type UniformRandomProvider Modifier and Type Method Description default java.util.stream.Stream<UniformRandomProvider>
JumpableUniformRandomProvider. jumps()
Returns an effectively unlimited stream of new random generators, each of which implements theUniformRandomProvider
interface.default java.util.stream.Stream<UniformRandomProvider>
JumpableUniformRandomProvider. jumps(long streamSize)
Returns a stream producing the givenstreamSize
number of new random generators, each of which implements theUniformRandomProvider
interface.Methods in org.apache.commons.rng with parameters of type UniformRandomProvider Modifier and Type Method Description (package private) static void
UniformRandomProviderSupport. nextBytes(UniformRandomProvider source, byte[] bytes, int start, int len)
Generates random bytes and places them into a user-supplied array.(package private) static double
UniformRandomProviderSupport. nextDouble(UniformRandomProvider source, double bound)
Generates adouble
value between 0 (inclusive) and the specified value (exclusive).(package private) static double
UniformRandomProviderSupport. nextDouble(UniformRandomProvider source, double origin, double bound)
Generates adouble
value between the specifiedorigin
(inclusive) and the specifiedbound
(exclusive).(package private) static float
UniformRandomProviderSupport. nextFloat(UniformRandomProvider source, float bound)
Generates afloat
value between 0 (inclusive) and the specified value (exclusive).(package private) static float
UniformRandomProviderSupport. nextFloat(UniformRandomProvider source, float origin, float bound)
Generates afloat
value between the specifiedorigin
(inclusive) and the specifiedbound
(exclusive).(package private) static int
UniformRandomProviderSupport. nextInt(UniformRandomProvider source, int n)
Generates anint
value between 0 (inclusive) and the specified value (exclusive).(package private) static int
UniformRandomProviderSupport. nextInt(UniformRandomProvider source, int origin, int bound)
Generates anint
value between the specifiedorigin
(inclusive) and the specifiedbound
(exclusive).(package private) static long
UniformRandomProviderSupport. nextLong(UniformRandomProvider source, long n)
Generates anlong
value between 0 (inclusive) and the specified value (exclusive).(package private) static long
UniformRandomProviderSupport. nextLong(UniformRandomProvider source, long origin, long bound)
Generates along
value between the specifiedorigin
(inclusive) and the specifiedbound
(exclusive).SplittableUniformRandomProvider
SplittableUniformRandomProvider. split(UniformRandomProvider source)
Creates a new random generator, split off from this one, that implements theSplittableUniformRandomProvider
interface. -
Uses of UniformRandomProvider in org.apache.commons.rng.core
Classes in org.apache.commons.rng.core that implement UniformRandomProvider Modifier and Type Class Description class
BaseProvider
Base class with default implementation for common methods. -
Uses of UniformRandomProvider in org.apache.commons.rng.core.source32
Classes in org.apache.commons.rng.core.source32 that implement UniformRandomProvider Modifier and Type Class Description (package private) class
AbstractPcg6432
This abstract class is a base for algorithms from the Permuted Congruential Generator (PCG) family that use an internal 64-bit Linear Congruential Generator (LCG) and output 32-bits per cycle.(package private) class
AbstractPcgMcg6432
This abstract class is a base for algorithms from the Permuted Congruential Generator (PCG) family that use an internal 64-bit Multiplicative Congruential Generator (MCG) and output 32-bits per cycle.class
AbstractWell
This abstract class implements the WELL class of pseudo-random number generator from François Panneton, Pierre L'Ecuyer and Makoto Matsumoto.(package private) class
AbstractXoRoShiRo64
This abstract class is a base for algorithms from the Xor-Shift-Rotate family of 32-bit generators with 64-bits of state.(package private) class
AbstractXoShiRo128
This abstract class is a base for algorithms from the Xor-Shift-Rotate family of 32-bit generators with 128-bits of state.class
DotyHumphreySmallFastCounting32
Implement the Small, Fast, Counting (SFC) 32-bit generator of Chris Doty-Humphrey.class
IntProvider
Base class for all implementations that provide anint
-based source randomness.class
ISAACRandom
A fast cryptographic pseudo-random number generator.class
JDKRandom
A provider that uses theRandom.nextInt()
method of the JDK'sRandom
class as the source of randomness.class
JenkinsSmallFast32
Implement Bob Jenkins's small fast (JSF) 32-bit generator.class
KISSRandom
Port from Marsaglia's "KISS" algorithm.class
L32X64Mix
A 32-bit all purpose generator.class
MersenneTwister
This class implements a powerful pseudo-random number generator developed by Makoto Matsumoto and Takuji Nishimura during 1996-1997.class
MiddleSquareWeylSequence
Middle Square Weyl Sequence Random Number Generator.class
MultiplyWithCarry256
Port from Marsaglia's "Multiply-With-Carry" algorithm.class
PcgMcgXshRr32
A Permuted Congruential Generator (PCG) that is composed of a 64-bit Multiplicative Congruential Generator (MCG) combined with the XSH-RR (xorshift; random rotate) output transformation to create 32-bit output.class
PcgMcgXshRs32
A Permuted Congruential Generator (PCG) that is composed of a 64-bit Multiplicative Congruential Generator (MCG) combined with the XSH-RS (xorshift; random shift) output transformation to create 32-bit output.class
PcgXshRr32
A Permuted Congruential Generator (PCG) that is composed of a 64-bit Linear Congruential Generator (LCG) combined with the XSH-RR (xorshift; random rotate) output transformation to create 32-bit output.class
PcgXshRs32
A Permuted Congruential Generator (PCG) that is composed of a 64-bit Linear Congruential Generator (LCG) combined with the XSH-RS (xorshift; random shift) output transformation to create 32-bit output.class
Well1024a
This class implements the WELL1024a pseudo-random number generator from François Panneton, Pierre L'Ecuyer and Makoto Matsumoto.class
Well19937a
This class implements the WELL19937a pseudo-random number generator from François Panneton, Pierre L'Ecuyer and Makoto Matsumoto.class
Well19937c
This class implements the WELL19937c pseudo-random number generator from François Panneton, Pierre L'Ecuyer and Makoto Matsumoto.class
Well44497a
This class implements the WELL44497a pseudo-random number generator from François Panneton, Pierre L'Ecuyer and Makoto Matsumoto.class
Well44497b
This class implements the WELL44497b pseudo-random number generator from François Panneton, Pierre L'Ecuyer and Makoto Matsumoto.class
Well512a
This class implements the WELL512a pseudo-random number generator from François Panneton, Pierre L'Ecuyer and Makoto Matsumoto.class
XoRoShiRo64Star
A fast 32-bit generator suitable forfloat
generation.class
XoRoShiRo64StarStar
A fast all-purpose 32-bit generator.class
XoShiRo128Plus
A fast 32-bit generator suitable forfloat
generation.class
XoShiRo128PlusPlus
A fast all-purpose 32-bit generator.class
XoShiRo128StarStar
A fast all-purpose 32-bit generator.Methods in org.apache.commons.rng.core.source32 that return UniformRandomProvider Modifier and Type Method Description UniformRandomProvider
AbstractXoShiRo128. jump()
Creates a copy of the UniformRandomProvider and then advances the state of the current instance.UniformRandomProvider
L32X64Mix. jump()
Creates a copy of the UniformRandomProvider and then retreats the state of the current instance.Methods in org.apache.commons.rng.core.source32 with parameters of type UniformRandomProvider Modifier and Type Method Description private static SplittableUniformRandomProvider
L32X64Mix. create(long seed, UniformRandomProvider source)
Create a new instance using the givenseed
andsource
of randomness to initialise the instance.SplittableUniformRandomProvider
L32X64Mix. split(UniformRandomProvider source)
Creates a new random generator, split off from this one, that implements theSplittableUniformRandomProvider
interface. -
Uses of UniformRandomProvider in org.apache.commons.rng.core.source64
Classes in org.apache.commons.rng.core.source64 that implement UniformRandomProvider Modifier and Type Class Description (package private) class
AbstractL128
This abstract class is a base for algorithms from the LXM family of generators with a 128-bit LCG sub-generator.(package private) class
AbstractL64
This abstract class is a base for algorithms from the LXM family of generators with a 64-bit LCG sub-generator.(package private) class
AbstractL64X128
This abstract class is a base for algorithms from the LXM family of generators with a 64-bit LCG and 128-bit XBG sub-generator.(package private) class
AbstractXoRoShiRo1024
This abstract class is a base for algorithms from the Xor-Shift-Rotate family of 64-bit generators with 1024-bits of state.(package private) class
AbstractXoRoShiRo128
This abstract class is a base for algorithms from the Xor-Shift-Rotate family of 64-bit generators with 128-bits of state.(package private) class
AbstractXoShiRo256
This abstract class is a base for algorithms from the Xor-Shift-Rotate family of 64-bit generators with 256-bits of state.(package private) class
AbstractXoShiRo512
This abstract class is a base for algorithms from the Xor-Shift-Rotate family of 64-bit generators with 512-bits of state.class
DotyHumphreySmallFastCounting64
Implement the Small, Fast, Counting (SFC) 64-bit generator of Chris Doty-Humphrey.class
JenkinsSmallFast64
Implement Bob Jenkins's small fast (JSF) 64-bit generator.class
L128X1024Mix
A 64-bit all purpose generator.class
L128X128Mix
A 64-bit all purpose generator.class
L128X256Mix
A 64-bit all purpose generator.class
L64X1024Mix
A 64-bit all purpose generator.class
L64X128Mix
A 64-bit all purpose generator.class
L64X128StarStar
A 64-bit all purpose generator.class
L64X256Mix
A 64-bit all purpose generator.class
LongProvider
Base class for all implementations that provide along
-based source randomness.class
MersenneTwister64
This class provides the 64-bits version of the originally 32-bitsMersenne Twister
.class
PcgRxsMXs64
A Permuted Congruential Generator (PCG) that is composed of a 64-bit Linear Congruential Generator (LCG) combined with the RXS-M-XS (random xorshift; multiply; xorshift) output transformation to create 64-bit output.class
SplitMix64
A fast RNG, with 64 bits of state, that can be used to initialize the state of other generators.class
TwoCmres
Random number generator designed by Mark D. Overton.class
XoRoShiRo1024PlusPlus
A large-state all-purpose 64-bit generator.class
XoRoShiRo1024Star
A large-state 64-bit generator suitable fordouble
generation.class
XoRoShiRo1024StarStar
A large-state all-purpose 64-bit generator.class
XoRoShiRo128Plus
A fast 64-bit generator suitable fordouble
generation.class
XoRoShiRo128PlusPlus
A fast all-purpose 64-bit generator.class
XoRoShiRo128StarStar
A fast all-purpose 64-bit generator.class
XorShift1024Star
A fast RNG implementing theXorShift1024*
algorithm.class
XorShift1024StarPhi
A fast RNG implementing theXorShift1024*
algorithm.class
XoShiRo256Plus
A fast 64-bit generator suitable fordouble
generation.class
XoShiRo256PlusPlus
A fast all-purpose 64-bit generator.class
XoShiRo256StarStar
A fast all-purpose 64-bit generator.class
XoShiRo512Plus
A fast 64-bit generator suitable fordouble
generation.class
XoShiRo512PlusPlus
A fast all-purpose generator.class
XoShiRo512StarStar
A fast all-purpose generator.Methods in org.apache.commons.rng.core.source64 that return UniformRandomProvider Modifier and Type Method Description UniformRandomProvider
AbstractL128. jump()
Creates a copy of the UniformRandomProvider and then retreats the state of the current instance.UniformRandomProvider
AbstractL64. jump()
Creates a copy of the UniformRandomProvider and then retreats the state of the current instance.UniformRandomProvider
AbstractL64X128. jump()
Creates a copy of the UniformRandomProvider and then retreats the state of the current instance.UniformRandomProvider
AbstractXoRoShiRo1024. jump()
Creates a copy of the UniformRandomProvider and then advances the state of the current instance.UniformRandomProvider
AbstractXoRoShiRo128. jump()
Creates a copy of the UniformRandomProvider and then advances the state of the current instance.UniformRandomProvider
AbstractXoShiRo256. jump()
Creates a copy of the UniformRandomProvider and then advances the state of the current instance.UniformRandomProvider
AbstractXoShiRo512. jump()
Creates a copy of the UniformRandomProvider and then advances the state of the current instance.UniformRandomProvider
L128X1024Mix. jump()
Creates a copy of the UniformRandomProvider and then retreats the state of the current instance.UniformRandomProvider
L128X128Mix. jump()
Creates a copy of the UniformRandomProvider and then retreats the state of the current instance.UniformRandomProvider
L128X256Mix. jump()
Creates a copy of the UniformRandomProvider and then retreats the state of the current instance.UniformRandomProvider
L64X1024Mix. jump()
Creates a copy of the UniformRandomProvider and then retreats the state of the current instance.UniformRandomProvider
L64X256Mix. jump()
Creates a copy of the UniformRandomProvider and then retreats the state of the current instance.UniformRandomProvider
XoRoShiRo128PlusPlus. jump()
Creates a copy of the UniformRandomProvider and then advances the state of the current instance.UniformRandomProvider
XorShift1024Star. jump()
Creates a copy of the UniformRandomProvider and then advances the state of the current instance.Methods in org.apache.commons.rng.core.source64 with parameters of type UniformRandomProvider Modifier and Type Method Description private static SplittableUniformRandomProvider
L128X1024Mix. create(long seed, UniformRandomProvider source)
Create a new instance using the givenseed
andsource
of randomness to initialise the instance.private static SplittableUniformRandomProvider
L128X128Mix. create(long seed, UniformRandomProvider source)
Create a new instance using the givenseed
andsource
of randomness to initialise the instance.private static SplittableUniformRandomProvider
L128X256Mix. create(long seed, UniformRandomProvider source)
Create a new instance using the givenseed
andsource
of randomness to initialise the instance.private static SplittableUniformRandomProvider
L64X1024Mix. create(long seed, UniformRandomProvider source)
Create a new instance using the givenseed
andsource
of randomness to initialise the instance.private static SplittableUniformRandomProvider
L64X128Mix. create(long seed, UniformRandomProvider source)
Create a new instance using the givenseed
andsource
of randomness to initialise the instance.private static SplittableUniformRandomProvider
L64X128StarStar. create(long seed, UniformRandomProvider source)
Create a new instance using the givenseed
andsource
of randomness to initialise the instance.private static SplittableUniformRandomProvider
L64X256Mix. create(long seed, UniformRandomProvider source)
Create a new instance using the givenseed
andsource
of randomness to initialise the instance.SplittableUniformRandomProvider
L128X1024Mix. split(UniformRandomProvider source)
Creates a new random generator, split off from this one, that implements theSplittableUniformRandomProvider
interface.SplittableUniformRandomProvider
L128X128Mix. split(UniformRandomProvider source)
Creates a new random generator, split off from this one, that implements theSplittableUniformRandomProvider
interface.SplittableUniformRandomProvider
L128X256Mix. split(UniformRandomProvider source)
Creates a new random generator, split off from this one, that implements theSplittableUniformRandomProvider
interface.SplittableUniformRandomProvider
L64X1024Mix. split(UniformRandomProvider source)
Creates a new random generator, split off from this one, that implements theSplittableUniformRandomProvider
interface.SplittableUniformRandomProvider
L64X128Mix. split(UniformRandomProvider source)
Creates a new random generator, split off from this one, that implements theSplittableUniformRandomProvider
interface.SplittableUniformRandomProvider
L64X128StarStar. split(UniformRandomProvider source)
Creates a new random generator, split off from this one, that implements theSplittableUniformRandomProvider
interface.SplittableUniformRandomProvider
L64X256Mix. split(UniformRandomProvider source)
Creates a new random generator, split off from this one, that implements theSplittableUniformRandomProvider
interface. -
Uses of UniformRandomProvider in org.apache.commons.rng.core.util
Methods in org.apache.commons.rng.core.util with parameters of type UniformRandomProvider Modifier and Type Method Description T
RandomStreams.SeededObjectFactory. create(long seed, UniformRandomProvider source)
Creates the object.(package private) static long
RandomStreams. createSeed(UniformRandomProvider rng)
Creates a seed to prepend to a counter. -
Uses of UniformRandomProvider in org.apache.commons.rng.sampling
Fields in org.apache.commons.rng.sampling declared as UniformRandomProvider Modifier and Type Field Description private UniformRandomProvider
CollectionSampler. rng
RNG.private UniformRandomProvider
CombinationSampler. rng
RNG.private UniformRandomProvider
PermutationSampler. rng
RNG.private UniformRandomProvider
UnitSphereSampler.UnitSphereSampler1D. rng
The source of randomness.Methods in org.apache.commons.rng.sampling with parameters of type UniformRandomProvider Modifier and Type Method Description S
CompositeSamplers.Builder. build(UniformRandomProvider rng)
Builds the composite sampler.S
CompositeSamplers.SamplerBuilder. build(UniformRandomProvider rng)
Builds the composite sampler.private static <T extends SharedStateSampler<T>>
java.util.List<T>CompositeSamplers. copy(java.util.List<T> samplers, UniformRandomProvider rng)
Create a copy instance of each sampler in the list of samplers using the given uniform random provider as the source of randomness.DiscreteSampler
CompositeSamplers.DiscreteProbabilitySamplerFactory. create(UniformRandomProvider rng, double[] probabilities)
Creates the sampler.private DiscreteSampler
CompositeSamplers.SamplerBuilder. createDiscreteSampler(UniformRandomProvider rng, double[] weights)
Creates the discrete sampler of the enumerated probability distribution.private static SharedStateDiscreteSampler
DiscreteProbabilityCollectionSampler. createSampler(UniformRandomProvider rng, double[] probabilities)
Creates the sampler of the enumerated probability distribution.private static <T> SharedStateDiscreteSampler
DiscreteProbabilityCollectionSampler. createSampler(UniformRandomProvider rng, java.util.List<T> collection, double[] probabilities)
Creates the sampler of the enumerated probability distribution.static UnitSphereSampler
UnitSphereSampler. of(UniformRandomProvider rng, int dimension)
Create a unit sphere sampler for the given dimension.(package private) static int[]
SubsetSamplerUtils. partialSample(int[] domain, int steps, UniformRandomProvider rng, boolean upper)
Perform a partial Fisher-Yates shuffle of the domain in-place and return either the upper fully shuffled section or the remaining lower partially shuffled section.static <T> java.util.List<T>
ListSampler. sample(UniformRandomProvider rng, java.util.List<T> collection, int k)
Generates a list of sizek
whose entries are selected randomly, without repetition, from the items in the givencollection
.static boolean[]
ArraySampler. shuffle(UniformRandomProvider rng, boolean[] array)
Shuffles the entries of the given array.static boolean[]
ArraySampler. shuffle(UniformRandomProvider rng, boolean[] array, int from, int to)
Shuffles the entries of the given array in the range[from, to)
.static byte[]
ArraySampler. shuffle(UniformRandomProvider rng, byte[] array)
Shuffles the entries of the given array.static byte[]
ArraySampler. shuffle(UniformRandomProvider rng, byte[] array, int from, int to)
Shuffles the entries of the given array in the range[from, to)
.static char[]
ArraySampler. shuffle(UniformRandomProvider rng, char[] array)
Shuffles the entries of the given array.static char[]
ArraySampler. shuffle(UniformRandomProvider rng, char[] array, int from, int to)
Shuffles the entries of the given array in the range[from, to)
.static double[]
ArraySampler. shuffle(UniformRandomProvider rng, double[] array)
Shuffles the entries of the given array.static double[]
ArraySampler. shuffle(UniformRandomProvider rng, double[] array, int from, int to)
Shuffles the entries of the given array in the range[from, to)
.static float[]
ArraySampler. shuffle(UniformRandomProvider rng, float[] array)
Shuffles the entries of the given array.static float[]
ArraySampler. shuffle(UniformRandomProvider rng, float[] array, int from, int to)
Shuffles the entries of the given array in the range[from, to)
.static int[]
ArraySampler. shuffle(UniformRandomProvider rng, int[] array)
Shuffles the entries of the given array.static int[]
ArraySampler. shuffle(UniformRandomProvider rng, int[] array, int from, int to)
Shuffles the entries of the given array in the range[from, to)
.static long[]
ArraySampler. shuffle(UniformRandomProvider rng, long[] array)
Shuffles the entries of the given array.static long[]
ArraySampler. shuffle(UniformRandomProvider rng, long[] array, int from, int to)
Shuffles the entries of the given array in the range[from, to)
.static short[]
ArraySampler. shuffle(UniformRandomProvider rng, short[] array)
Shuffles the entries of the given array.static short[]
ArraySampler. shuffle(UniformRandomProvider rng, short[] array, int from, int to)
Shuffles the entries of the given array in the range[from, to)
.static <T> T[]
ArraySampler. shuffle(UniformRandomProvider rng, T[] array)
Shuffles the entries of the given array.static <T> T[]
ArraySampler. shuffle(UniformRandomProvider rng, T[] array, int from, int to)
Shuffles the entries of the given array in the range[from, to)
.static <T> void
ListSampler. shuffle(UniformRandomProvider rng, java.util.List<T> list)
Shuffles the entries of the given array, using the Fisher-Yates algorithm.static <T> void
ListSampler. shuffle(UniformRandomProvider rng, java.util.List<T> list, int start, boolean towardHead)
Shuffles the entries of the given array, using the Fisher-Yates algorithm.static void
PermutationSampler. shuffle(UniformRandomProvider rng, int[] list)
Shuffles the entries of the given array.static void
PermutationSampler. shuffle(UniformRandomProvider rng, int[] list, int start, boolean towardHead)
Shuffles the entries of the given array, using the Fisher-Yates algorithm.CollectionSampler<T>
CollectionSampler. withUniformRandomProvider(UniformRandomProvider rng)
Create a new instance of the sampler with the same underlying state using the given uniform random provider as the source of randomness.CombinationSampler
CombinationSampler. withUniformRandomProvider(UniformRandomProvider rng)
Create a new instance of the sampler with the same underlying state using the given uniform random provider as the source of randomness.CompositeSamplers.SharedStateContinuousSamplerFactory.CompositeSharedStateContinuousSampler
CompositeSamplers.SharedStateContinuousSamplerFactory.CompositeSharedStateContinuousSampler. withUniformRandomProvider(UniformRandomProvider rng)
SharedStateDiscreteSampler
CompositeSamplers.SharedStateDiscreteProbabilitySampler. withUniformRandomProvider(UniformRandomProvider rng)
CompositeSamplers.SharedStateDiscreteSamplerFactory.CompositeSharedStateDiscreteSampler
CompositeSamplers.SharedStateDiscreteSamplerFactory.CompositeSharedStateDiscreteSampler. withUniformRandomProvider(UniformRandomProvider rng)
CompositeSamplers.SharedStateLongSamplerFactory.CompositeSharedStateLongSampler
CompositeSamplers.SharedStateLongSamplerFactory.CompositeSharedStateLongSampler. withUniformRandomProvider(UniformRandomProvider rng)
CompositeSamplers.SharedStateObjectSamplerFactory.CompositeSharedStateObjectSampler<T>
CompositeSamplers.SharedStateObjectSamplerFactory.CompositeSharedStateObjectSampler. withUniformRandomProvider(UniformRandomProvider rng)
DiscreteProbabilityCollectionSampler<T>
DiscreteProbabilityCollectionSampler. withUniformRandomProvider(UniformRandomProvider rng)
Create a new instance of the sampler with the same underlying state using the given uniform random provider as the source of randomness.PermutationSampler
PermutationSampler. withUniformRandomProvider(UniformRandomProvider rng)
Create a new instance of the sampler with the same underlying state using the given uniform random provider as the source of randomness.R
SharedStateSampler. withUniformRandomProvider(UniformRandomProvider rng)
Create a new instance of the sampler with the same underlying state using the given uniform random provider as the source of randomness.UnitSphereSampler
UnitSphereSampler.UnitSphereSampler1D. withUniformRandomProvider(UniformRandomProvider rng)
UnitSphereSampler
UnitSphereSampler.UnitSphereSampler2D. withUniformRandomProvider(UniformRandomProvider rng)
UnitSphereSampler
UnitSphereSampler.UnitSphereSampler3D. withUniformRandomProvider(UniformRandomProvider rng)
UnitSphereSampler
UnitSphereSampler.UnitSphereSamplerND. withUniformRandomProvider(UniformRandomProvider rng)
UnitSphereSampler
UnitSphereSampler. withUniformRandomProvider(UniformRandomProvider rng)
Create a new instance of the sampler with the same underlying state using the given uniform random provider as the source of randomness. -
Uses of UniformRandomProvider in org.apache.commons.rng.sampling.distribution
Fields in org.apache.commons.rng.sampling.distribution declared as UniformRandomProvider Modifier and Type Field Description private UniformRandomProvider
AhrensDieterExponentialSampler. rng
Underlying source of randomness.protected UniformRandomProvider
AhrensDieterMarsagliaTsangGammaSampler.BaseGammaSampler. rng
Underlying source of randomness.protected UniformRandomProvider
AliasMethodDiscreteSampler. rng
Underlying source of randomness.private UniformRandomProvider
BoxMullerGaussianSampler. rng
Deprecated.Underlying source of randomness.private UniformRandomProvider
BoxMullerNormalizedGaussianSampler. rng
Underlying source of randomness.protected UniformRandomProvider
ChengBetaSampler.BaseChengBetaSampler. rng
Underlying source of randomness.private UniformRandomProvider
ContinuousUniformSampler. rng
Underlying source of randomness.private UniformRandomProvider
DirichletSampler. rng
RNG (used for the toString() method).protected UniformRandomProvider
DiscreteUniformSampler.AbstractDiscreteUniformSampler. rng
Underlying source of randomness.private UniformRandomProvider
FastLoadedDiceRollerDiscreteSampler.FLDRSampler. rng
Underlying source of randomness.private UniformRandomProvider
GeometricSampler.GeometricExponentialSampler. rng
Underlying source of randomness.private UniformRandomProvider
GuideTableDiscreteSampler. rng
Underlying source of randomness.private UniformRandomProvider
InverseTransformContinuousSampler. rng
Underlying source of randomness.private UniformRandomProvider
InverseTransformDiscreteSampler. rng
Underlying source of randomness.private UniformRandomProvider
InverseTransformParetoSampler. rng
Underlying source of randomness.private UniformRandomProvider
KempSmallMeanPoissonSampler. rng
Underlying source of randomness.private UniformRandomProvider
LargeMeanPoissonSampler. rng
Underlying source of randomness.private UniformRandomProvider
LevySampler. rng
RNG (used for the toString() method).private UniformRandomProvider
MarsagliaNormalizedGaussianSampler. rng
Underlying source of randomness.protected UniformRandomProvider
MarsagliaTsangWangDiscreteSampler.AbstractMarsagliaTsangWangDiscreteSampler. rng
Underlying source of randomness.private UniformRandomProvider
RejectionInversionZipfSampler.RejectionInversionZipfSamplerImpl. rng
Underlying source of randomness.private UniformRandomProvider
SamplerBase. rng
Deprecated.RNG.private UniformRandomProvider
SmallMeanPoissonSampler. rng
Underlying source of randomness.private UniformRandomProvider
StableSampler. rng
Underlying source of randomness.private UniformRandomProvider
TSampler. rng
Source of randomness.protected UniformRandomProvider
UniformLongSampler. rng
Underlying source of randomness.private UniformRandomProvider
ZigguratNormalizedGaussianSampler. rng
Underlying source of randomness.private UniformRandomProvider
ZigguratSampler. rng
Underlying source of randomness.Methods in org.apache.commons.rng.sampling.distribution with parameters of type UniformRandomProvider Modifier and Type Method Description private static StableSampler
StableSampler. create(UniformRandomProvider rng, double alpha, double beta)
Creates a standardized sampler of a stable distribution with zero location and unit scale.private static SharedStateDiscreteSampler
MarsagliaTsangWangDiscreteSampler.Binomial. createBinomialDistributionSampler(UniformRandomProvider rng, int trials, double probabilityOfSuccess)
Creates the Binomial distribution sampler.private static SharedStateDiscreteSampler
MarsagliaTsangWangDiscreteSampler.Binomial. createBinomialDistributionSamplerFromRange(UniformRandomProvider rng, int trials, double p, boolean useInversion, double p0, int begin, int end)
Creates the Binomial distribution sampler using only the probability values forX
between the begin and the end (inclusive).private static SharedStateDiscreteSampler
MarsagliaTsangWangDiscreteSampler.Poisson. createPoissonDistributionFromX0(UniformRandomProvider rng, double mean)
Creates the Poisson distribution by computing probabilities recursively fromX=0
.private static SharedStateDiscreteSampler
MarsagliaTsangWangDiscreteSampler.Poisson. createPoissonDistributionFromXMode(UniformRandomProvider rng, double mean)
Creates the Poisson distribution by computing probabilities recursively upward and downward fromX=mode
, the location of the largest p-value.DiscreteSampler
PoissonSamplerCache. createPoissonSampler(UniformRandomProvider rng, double mean)
private static SharedStateContinuousSampler
DirichletSampler. createSampler(UniformRandomProvider rng, double alpha)
Creates a gamma sampler for a category with the given concentration parameter.private static FastLoadedDiceRollerDiscreteSampler
FastLoadedDiceRollerDiscreteSampler. createSampler(UniformRandomProvider rng, long[] frequencies, int[] offsets, int[] indices, java.math.BigInteger m)
Creates the sampler.private static FastLoadedDiceRollerDiscreteSampler
FastLoadedDiceRollerDiscreteSampler. createSampler(UniformRandomProvider rng, long[] frequencies, int[] indices, long m)
Creates the sampler.private static SharedStateDiscreteSampler
MarsagliaTsangWangDiscreteSampler. createSampler(UniformRandomProvider rng, java.lang.String distributionName, int[] prob, int offset)
Create a new instance for probabilitiesp(i)
where the sample valuex
isi + offset
.SharedStateDiscreteSampler
PoissonSamplerCache. createSharedStateSampler(UniformRandomProvider rng, double mean)
Creates a new Poisson sampler.private static DiscreteUniformSampler.AbstractDiscreteUniformSampler
DiscreteUniformSampler. createZeroBoundedSampler(UniformRandomProvider rng, int upper)
Create a new sampler for the range0
inclusive toupper
inclusive.private static UniformLongSampler
UniformLongSampler. createZeroBoundedSampler(UniformRandomProvider rng, long upper)
Create a new sampler for the range0
inclusive toupper
inclusive.(package private) static NormalizedGaussianSampler
InternalUtils. newNormalizedGaussianSampler(NormalizedGaussianSampler sampler, UniformRandomProvider rng)
Create a new instance of the given sampler usingSharedStateSampler.withUniformRandomProvider(UniformRandomProvider)
.static SharedStateContinuousSampler
AhrensDieterExponentialSampler. of(UniformRandomProvider rng, double mean)
Create a new exponential distribution sampler.static SharedStateContinuousSampler
AhrensDieterMarsagliaTsangGammaSampler. of(UniformRandomProvider rng, double alpha, double theta)
Creates a new gamma distribution sampler.static SharedStateDiscreteSampler
AliasMethodDiscreteSampler. of(UniformRandomProvider rng, double[] probabilities)
Creates a sampler.static SharedStateDiscreteSampler
AliasMethodDiscreteSampler. of(UniformRandomProvider rng, double[] probabilities, int alpha)
Creates a sampler.static <S extends NormalizedGaussianSampler & SharedStateContinuousSampler>
SBoxMullerNormalizedGaussianSampler. of(UniformRandomProvider rng)
Create a new normalised Gaussian sampler.static SharedStateContinuousSampler
ChengBetaSampler. of(UniformRandomProvider rng, double alpha, double beta)
Creates a new beta distribution sampler.static SharedStateContinuousSampler
ContinuousUniformSampler. of(UniformRandomProvider rng, double lo, double hi)
Creates a new continuous uniform distribution sampler.static SharedStateContinuousSampler
ContinuousUniformSampler. of(UniformRandomProvider rng, double lo, double hi, boolean excludeBounds)
Creates a new continuous uniform distribution sampler.static DirichletSampler
DirichletSampler. of(UniformRandomProvider rng, double... alpha)
Creates a new Dirichlet distribution sampler.static SharedStateDiscreteSampler
DiscreteUniformSampler. of(UniformRandomProvider rng, int lower, int upper)
Creates a new discrete uniform distribution sampler.static FastLoadedDiceRollerDiscreteSampler
FastLoadedDiceRollerDiscreteSampler. of(UniformRandomProvider rng, double[] weights)
Creates a sampler.static FastLoadedDiceRollerDiscreteSampler
FastLoadedDiceRollerDiscreteSampler. of(UniformRandomProvider rng, double[] weights, int alpha)
Creates a sampler.static FastLoadedDiceRollerDiscreteSampler
FastLoadedDiceRollerDiscreteSampler. of(UniformRandomProvider rng, long[] frequencies)
Creates a sampler.static SharedStateDiscreteSampler
GeometricSampler. of(UniformRandomProvider rng, double probabilityOfSuccess)
Creates a new geometric distribution sampler.static SharedStateDiscreteSampler
GuideTableDiscreteSampler. of(UniformRandomProvider rng, double[] probabilities)
Create a new sampler for an enumerated distribution using the givenprobabilities
.static SharedStateDiscreteSampler
GuideTableDiscreteSampler. of(UniformRandomProvider rng, double[] probabilities, double alpha)
Create a new sampler for an enumerated distribution using the givenprobabilities
.static SharedStateContinuousSampler
InverseTransformContinuousSampler. of(UniformRandomProvider rng, ContinuousInverseCumulativeProbabilityFunction function)
Create a new inverse-transform continuous sampler.static SharedStateDiscreteSampler
InverseTransformDiscreteSampler. of(UniformRandomProvider rng, DiscreteInverseCumulativeProbabilityFunction function)
Create a new inverse-transform discrete sampler.static SharedStateContinuousSampler
InverseTransformParetoSampler. of(UniformRandomProvider rng, double scale, double shape)
Creates a new Pareto distribution sampler.static SharedStateDiscreteSampler
KempSmallMeanPoissonSampler. of(UniformRandomProvider rng, double mean)
Creates a new sampler for the Poisson distribution.static SharedStateDiscreteSampler
LargeMeanPoissonSampler. of(UniformRandomProvider rng, double mean)
Creates a new Poisson distribution sampler.static LevySampler
LevySampler. of(UniformRandomProvider rng, double location, double scale)
Create a new Lévy distribution sampler.static <S extends NormalizedGaussianSampler & SharedStateContinuousSampler>
SMarsagliaNormalizedGaussianSampler. of(UniformRandomProvider rng)
Create a new normalised Gaussian sampler.static SharedStateDiscreteSampler
MarsagliaTsangWangDiscreteSampler.Binomial. of(UniformRandomProvider rng, int trials, double probabilityOfSuccess)
Creates a sampler for the Binomial distribution.static SharedStateDiscreteSampler
MarsagliaTsangWangDiscreteSampler.Enumerated. of(UniformRandomProvider rng, double[] probabilities)
Creates a sampler for an enumerated distribution ofn
values each with an associated probability.static SharedStateDiscreteSampler
MarsagliaTsangWangDiscreteSampler.Poisson. of(UniformRandomProvider rng, double mean)
Creates a sampler for the Poisson distribution.static SharedStateDiscreteSampler
PoissonSampler. of(UniformRandomProvider rng, double mean)
Creates a new Poisson distribution sampler.static SharedStateDiscreteSampler
RejectionInversionZipfSampler. of(UniformRandomProvider rng, int numberOfElements, double exponent)
Creates a new Zipf distribution sampler.static SharedStateDiscreteSampler
SmallMeanPoissonSampler. of(UniformRandomProvider rng, double mean)
Creates a new sampler for the Poisson distribution.static StableSampler
StableSampler. of(UniformRandomProvider rng, double alpha, double beta)
Creates a standardized sampler of a stable distribution with zero location and unit scale.static StableSampler
StableSampler. of(UniformRandomProvider rng, double alpha, double beta, double gamma, double delta)
Creates a sampler of a stable distribution.static TSampler
TSampler. of(UniformRandomProvider rng, double degreesOfFreedom)
Create a new t distribution sampler.static UniformLongSampler
UniformLongSampler. of(UniformRandomProvider rng, long lower, long upper)
Creates a new discrete uniform distribution sampler.static <S extends NormalizedGaussianSampler & SharedStateContinuousSampler>
SZigguratNormalizedGaussianSampler. of(UniformRandomProvider rng)
Create a new normalised Gaussian sampler.static ZigguratSampler.Exponential
ZigguratSampler.Exponential. of(UniformRandomProvider rng)
Create a new exponential sampler withmean = 1
.static ZigguratSampler.Exponential
ZigguratSampler.Exponential. of(UniformRandomProvider rng, double mean)
Create a new exponential sampler with the specifiedmean
.static ZigguratSampler.NormalizedGaussian
ZigguratSampler.NormalizedGaussian. of(UniformRandomProvider rng)
Create a new normalised Gaussian sampler.static DirichletSampler
DirichletSampler. symmetric(UniformRandomProvider rng, int k, double alpha)
Creates a new symmetric Dirichlet distribution sampler using the same concentration parameter for each category.SharedStateContinuousSampler
AhrensDieterExponentialSampler. withUniformRandomProvider(UniformRandomProvider rng)
Create a new instance of the sampler with the same underlying state using the given uniform random provider as the source of randomness.SharedStateContinuousSampler
AhrensDieterMarsagliaTsangGammaSampler.AhrensDieterGammaSampler. withUniformRandomProvider(UniformRandomProvider rng)
SharedStateContinuousSampler
AhrensDieterMarsagliaTsangGammaSampler.MarsagliaTsangGammaSampler. withUniformRandomProvider(UniformRandomProvider rng)
SharedStateContinuousSampler
AhrensDieterMarsagliaTsangGammaSampler. withUniformRandomProvider(UniformRandomProvider rng)
Create a new instance of the sampler with the same underlying state using the given uniform random provider as the source of randomness.SharedStateDiscreteSampler
AliasMethodDiscreteSampler.SmallTableAliasMethodDiscreteSampler. withUniformRandomProvider(UniformRandomProvider rng)
Create a new instance of the sampler with the same underlying state using the given uniform random provider as the source of randomness.SharedStateDiscreteSampler
AliasMethodDiscreteSampler. withUniformRandomProvider(UniformRandomProvider rng)
Create a new instance of the sampler with the same underlying state using the given uniform random provider as the source of randomness.SharedStateContinuousSampler
BoxMullerNormalizedGaussianSampler. withUniformRandomProvider(UniformRandomProvider rng)
Create a new instance of the sampler with the same underlying state using the given uniform random provider as the source of randomness.SharedStateContinuousSampler
ChengBetaSampler.ChengBBBetaSampler. withUniformRandomProvider(UniformRandomProvider rng)
SharedStateContinuousSampler
ChengBetaSampler.ChengBCBetaSampler. withUniformRandomProvider(UniformRandomProvider rng)
SharedStateContinuousSampler
ChengBetaSampler. withUniformRandomProvider(UniformRandomProvider rng)
Create a new instance of the sampler with the same underlying state using the given uniform random provider as the source of randomness.SharedStateContinuousSampler
ContinuousUniformSampler.OpenIntervalContinuousUniformSampler. withUniformRandomProvider(UniformRandomProvider rng)
SharedStateContinuousSampler
ContinuousUniformSampler. withUniformRandomProvider(UniformRandomProvider rng)
Create a new instance of the sampler with the same underlying state using the given uniform random provider as the source of randomness.DirichletSampler.GeneralDirichletSampler
DirichletSampler.GeneralDirichletSampler. withUniformRandomProvider(UniformRandomProvider rng)
DirichletSampler.SymmetricDirichletSampler
DirichletSampler.SymmetricDirichletSampler. withUniformRandomProvider(UniformRandomProvider rng)
abstract DirichletSampler
DirichletSampler. withUniformRandomProvider(UniformRandomProvider rng)
Create a new instance of the sampler with the same underlying state using the given uniform random provider as the source of randomness.SharedStateDiscreteSampler
DiscreteUniformSampler.FixedDiscreteUniformSampler. withUniformRandomProvider(UniformRandomProvider rng)
SharedStateDiscreteSampler
DiscreteUniformSampler.LargeRangeDiscreteUniformSampler. withUniformRandomProvider(UniformRandomProvider rng)
SharedStateDiscreteSampler
DiscreteUniformSampler.OffsetDiscreteUniformSampler. withUniformRandomProvider(UniformRandomProvider rng)
SharedStateDiscreteSampler
DiscreteUniformSampler.PowerOf2RangeDiscreteUniformSampler. withUniformRandomProvider(UniformRandomProvider rng)
SharedStateDiscreteSampler
DiscreteUniformSampler.SmallRangeDiscreteUniformSampler. withUniformRandomProvider(UniformRandomProvider rng)
SharedStateDiscreteSampler
DiscreteUniformSampler. withUniformRandomProvider(UniformRandomProvider rng)
Create a new instance of the sampler with the same underlying state using the given uniform random provider as the source of randomness.FastLoadedDiceRollerDiscreteSampler
FastLoadedDiceRollerDiscreteSampler.FixedValueDiscreteSampler. withUniformRandomProvider(UniformRandomProvider rng)
FastLoadedDiceRollerDiscreteSampler
FastLoadedDiceRollerDiscreteSampler.FLDRSampler. withUniformRandomProvider(UniformRandomProvider rng)
Create a new instance of the sampler with the same underlying state using the given uniform random provider as the source of randomness.abstract FastLoadedDiceRollerDiscreteSampler
FastLoadedDiceRollerDiscreteSampler. withUniformRandomProvider(UniformRandomProvider rng)
Create a new instance of the sampler with the same underlying state using the given uniform random provider as the source of randomness.SharedStateContinuousSampler
GaussianSampler. withUniformRandomProvider(UniformRandomProvider rng)
Create a new instance of the sampler with the same underlying state using the given uniform random provider as the source of randomness.SharedStateDiscreteSampler
GeometricSampler.GeometricExponentialSampler. withUniformRandomProvider(UniformRandomProvider rng)
SharedStateDiscreteSampler
GeometricSampler.GeometricP1Sampler. withUniformRandomProvider(UniformRandomProvider rng)
SharedStateDiscreteSampler
GuideTableDiscreteSampler. withUniformRandomProvider(UniformRandomProvider rng)
Create a new instance of the sampler with the same underlying state using the given uniform random provider as the source of randomness.SharedStateContinuousSampler
InverseTransformContinuousSampler. withUniformRandomProvider(UniformRandomProvider rng)
Create a new instance of the sampler with the same underlying state using the given uniform random provider as the source of randomness.SharedStateDiscreteSampler
InverseTransformDiscreteSampler. withUniformRandomProvider(UniformRandomProvider rng)
Create a new instance of the sampler with the same underlying state using the given uniform random provider as the source of randomness.SharedStateContinuousSampler
InverseTransformParetoSampler. withUniformRandomProvider(UniformRandomProvider rng)
Create a new instance of the sampler with the same underlying state using the given uniform random provider as the source of randomness.SharedStateDiscreteSampler
KempSmallMeanPoissonSampler. withUniformRandomProvider(UniformRandomProvider rng)
Create a new instance of the sampler with the same underlying state using the given uniform random provider as the source of randomness.SharedStateDiscreteSampler
LargeMeanPoissonSampler. withUniformRandomProvider(UniformRandomProvider rng)
Create a new instance of the sampler with the same underlying state using the given uniform random provider as the source of randomness.LevySampler
LevySampler. withUniformRandomProvider(UniformRandomProvider rng)
Create a new instance of the sampler with the same underlying state using the given uniform random provider as the source of randomness.SharedStateContinuousSampler
LogNormalSampler. withUniformRandomProvider(UniformRandomProvider rng)
Create a new instance of the sampler with the same underlying state using the given uniform random provider as the source of randomness.SharedStateContinuousSampler
MarsagliaNormalizedGaussianSampler. withUniformRandomProvider(UniformRandomProvider rng)
Create a new instance of the sampler with the same underlying state using the given uniform random provider as the source of randomness.SharedStateDiscreteSampler
MarsagliaTsangWangDiscreteSampler.Binomial.MarsagliaTsangWangFixedResultBinomialSampler. withUniformRandomProvider(UniformRandomProvider rng)
SharedStateDiscreteSampler
MarsagliaTsangWangDiscreteSampler.Binomial.MarsagliaTsangWangInversionBinomialSampler. withUniformRandomProvider(UniformRandomProvider rng)
SharedStateDiscreteSampler
MarsagliaTsangWangDiscreteSampler.MarsagliaTsangWangBase64Int16DiscreteSampler. withUniformRandomProvider(UniformRandomProvider rng)
SharedStateDiscreteSampler
MarsagliaTsangWangDiscreteSampler.MarsagliaTsangWangBase64Int32DiscreteSampler. withUniformRandomProvider(UniformRandomProvider rng)
SharedStateDiscreteSampler
MarsagliaTsangWangDiscreteSampler.MarsagliaTsangWangBase64Int8DiscreteSampler. withUniformRandomProvider(UniformRandomProvider rng)
SharedStateDiscreteSampler
PoissonSampler. withUniformRandomProvider(UniformRandomProvider rng)
Create a new instance of the sampler with the same underlying state using the given uniform random provider as the source of randomness.SharedStateDiscreteSampler
RejectionInversionZipfSampler.RejectionInversionZipfSamplerImpl. withUniformRandomProvider(UniformRandomProvider rng)
SharedStateDiscreteSampler
RejectionInversionZipfSampler. withUniformRandomProvider(UniformRandomProvider rng)
Create a new instance of the sampler with the same underlying state using the given uniform random provider as the source of randomness.SharedStateDiscreteSampler
SmallMeanPoissonSampler. withUniformRandomProvider(UniformRandomProvider rng)
Create a new instance of the sampler with the same underlying state using the given uniform random provider as the source of randomness.StableSampler.Alpha1CMSStableSampler
StableSampler.Alpha1CMSStableSampler. withUniformRandomProvider(UniformRandomProvider rng)
StableSampler.Beta0CMSStableSampler
StableSampler.Beta0CMSStableSampler. withUniformRandomProvider(UniformRandomProvider rng)
StableSampler.Beta0WeronStableSampler
StableSampler.Beta0WeronStableSampler. withUniformRandomProvider(UniformRandomProvider rng)
StableSampler.CauchyStableSampler
StableSampler.CauchyStableSampler. withUniformRandomProvider(UniformRandomProvider rng)
StableSampler.CMSStableSampler
StableSampler.CMSStableSampler. withUniformRandomProvider(UniformRandomProvider rng)
StableSampler.GaussianStableSampler
StableSampler.GaussianStableSampler. withUniformRandomProvider(UniformRandomProvider rng)
StableSampler.LevyStableSampler
StableSampler.LevyStableSampler. withUniformRandomProvider(UniformRandomProvider rng)
StableSampler
StableSampler.TransformedStableSampler. withUniformRandomProvider(UniformRandomProvider rng)
StableSampler.WeronStableSampler
StableSampler.WeronStableSampler. withUniformRandomProvider(UniformRandomProvider rng)
abstract StableSampler
StableSampler. withUniformRandomProvider(UniformRandomProvider rng)
Create a new instance of the sampler with the same underlying state using the given uniform random provider as the source of randomness.TSampler.NormalTSampler
TSampler.NormalTSampler. withUniformRandomProvider(UniformRandomProvider rng)
Create a new instance of the sampler with the same underlying state using the given uniform random provider as the source of randomness.TSampler.StudentsTSampler
TSampler.StudentsTSampler. withUniformRandomProvider(UniformRandomProvider rng)
Create a new instance of the sampler with the same underlying state using the given uniform random provider as the source of randomness.abstract TSampler
TSampler. withUniformRandomProvider(UniformRandomProvider rng)
Create a new instance of the sampler with the same underlying state using the given uniform random provider as the source of randomness.UniformLongSampler
UniformLongSampler.FixedUniformLongSampler. withUniformRandomProvider(UniformRandomProvider rng)
UniformLongSampler
UniformLongSampler.LargeRangeUniformLongSampler. withUniformRandomProvider(UniformRandomProvider rng)
UniformLongSampler
UniformLongSampler.OffsetUniformLongSampler. withUniformRandomProvider(UniformRandomProvider rng)
UniformLongSampler
UniformLongSampler.PowerOf2RangeUniformLongSampler. withUniformRandomProvider(UniformRandomProvider rng)
UniformLongSampler
UniformLongSampler.SmallRangeUniformLongSampler. withUniformRandomProvider(UniformRandomProvider rng)
abstract UniformLongSampler
UniformLongSampler. withUniformRandomProvider(UniformRandomProvider rng)
Create a new instance of the sampler with the same underlying state using the given uniform random provider as the source of randomness.SharedStateContinuousSampler
ZigguratNormalizedGaussianSampler. withUniformRandomProvider(UniformRandomProvider rng)
Create a new instance of the sampler with the same underlying state using the given uniform random provider as the source of randomness.ZigguratSampler.Exponential.ExponentialMean
ZigguratSampler.Exponential.ExponentialMean. withUniformRandomProvider(UniformRandomProvider rng)
ZigguratSampler.Exponential
ZigguratSampler.Exponential. withUniformRandomProvider(UniformRandomProvider rng)
Create a new instance of the sampler with the same underlying state using the given uniform random provider as the source of randomness.ZigguratSampler.NormalizedGaussian
ZigguratSampler.NormalizedGaussian. withUniformRandomProvider(UniformRandomProvider rng)
Create a new instance of the sampler with the same underlying state using the given uniform random provider as the source of randomness. -
Uses of UniformRandomProvider in org.apache.commons.rng.sampling.shape
Fields in org.apache.commons.rng.sampling.shape declared as UniformRandomProvider Modifier and Type Field Description private UniformRandomProvider
BoxSampler. rng
The source of randomness.private UniformRandomProvider
LineSampler. rng
The source of randomness.private UniformRandomProvider
TetrahedronSampler. rng
The source of randomness.private UniformRandomProvider
TriangleSampler. rng
The source of randomness.private UniformRandomProvider
UnitBallSampler.UnitBallSampler1D. rng
The source of randomness.private UniformRandomProvider
UnitBallSampler.UnitBallSampler2D. rng
The source of randomness.Methods in org.apache.commons.rng.sampling.shape with parameters of type UniformRandomProvider Modifier and Type Method Description static BoxSampler
BoxSampler. of(UniformRandomProvider rng, double[] a, double[] b)
Create a box sampler with boundsa
andb
.static LineSampler
LineSampler. of(UniformRandomProvider rng, double[] a, double[] b)
Create a line sampler with verticesa
andb
.static TetrahedronSampler
TetrahedronSampler. of(UniformRandomProvider rng, double[] a, double[] b, double[] c, double[] d)
Create a tetrahedron sampler with verticesa
,b
,c
andd
.static TriangleSampler
TriangleSampler. of(UniformRandomProvider rng, double[] a, double[] b, double[] c)
Create a triangle sampler with verticesa
,b
andc
.static UnitBallSampler
UnitBallSampler. of(UniformRandomProvider rng, int dimension)
Create a unit n-ball sampler for the given dimension.BoxSampler
BoxSampler.BoxSampler2D. withUniformRandomProvider(UniformRandomProvider rng)
BoxSampler
BoxSampler.BoxSampler3D. withUniformRandomProvider(UniformRandomProvider rng)
BoxSampler
BoxSampler.BoxSamplerND. withUniformRandomProvider(UniformRandomProvider rng)
abstract BoxSampler
BoxSampler. withUniformRandomProvider(UniformRandomProvider rng)
Create a new instance of the sampler with the same underlying state using the given uniform random provider as the source of randomness.LineSampler
LineSampler.LineSampler1D. withUniformRandomProvider(UniformRandomProvider rng)
LineSampler
LineSampler.LineSampler2D. withUniformRandomProvider(UniformRandomProvider rng)
LineSampler
LineSampler.LineSampler3D. withUniformRandomProvider(UniformRandomProvider rng)
LineSampler
LineSampler.LineSamplerND. withUniformRandomProvider(UniformRandomProvider rng)
abstract LineSampler
LineSampler. withUniformRandomProvider(UniformRandomProvider rng)
Create a new instance of the sampler with the same underlying state using the given uniform random provider as the source of randomness.TetrahedronSampler
TetrahedronSampler. withUniformRandomProvider(UniformRandomProvider rng)
Create a new instance of the sampler with the same underlying state using the given uniform random provider as the source of randomness.TriangleSampler
TriangleSampler.TriangleSampler2D. withUniformRandomProvider(UniformRandomProvider rng)
TriangleSampler
TriangleSampler.TriangleSampler3D. withUniformRandomProvider(UniformRandomProvider rng)
TriangleSampler
TriangleSampler.TriangleSamplerND. withUniformRandomProvider(UniformRandomProvider rng)
abstract TriangleSampler
TriangleSampler. withUniformRandomProvider(UniformRandomProvider rng)
Create a new instance of the sampler with the same underlying state using the given uniform random provider as the source of randomness.UnitBallSampler
UnitBallSampler.UnitBallSampler1D. withUniformRandomProvider(UniformRandomProvider rng)
UnitBallSampler
UnitBallSampler.UnitBallSampler2D. withUniformRandomProvider(UniformRandomProvider rng)
UnitBallSampler
UnitBallSampler.UnitBallSampler3D. withUniformRandomProvider(UniformRandomProvider rng)
UnitBallSampler
UnitBallSampler.UnitBallSamplerND. withUniformRandomProvider(UniformRandomProvider rng)
abstract UnitBallSampler
UnitBallSampler. withUniformRandomProvider(UniformRandomProvider rng)
Create a new instance of the sampler with the same underlying state using the given uniform random provider as the source of randomness. -
Uses of UniformRandomProvider in org.apache.commons.rng.simple
Classes in org.apache.commons.rng.simple that implement UniformRandomProvider Modifier and Type Class Description class
JDKRandomWrapper
Wraps aRandom
instance to implementUniformRandomProvider
.Fields in org.apache.commons.rng.simple with type parameters of type UniformRandomProvider Modifier and Type Field Description private static java.util.Map<RandomSource,java.lang.ThreadLocal<UniformRandomProvider>>
ThreadLocalRandomSource. SOURCES
A map containing theThreadLocal
instance for eachRandomSource
.Methods in org.apache.commons.rng.simple that return UniformRandomProvider Modifier and Type Method Description static UniformRandomProvider
ThreadLocalRandomSource. current(RandomSource source)
Returns the current thread's copy of the givensource
.protected UniformRandomProvider
ThreadLocalRandomSource.ThreadLocalRng. initialValue()
static UniformRandomProvider
RandomSource. unrestorable(UniformRandomProvider delegate)
Wraps the givendelegate
generator in a new instance that only provides access to theUniformRandomProvider
methods.Methods in org.apache.commons.rng.simple with parameters of type UniformRandomProvider Modifier and Type Method Description byte[]
RandomSource. createSeed(UniformRandomProvider rng)
Creates a seed suitable for the implementing class represented by this random source using the supplied source of randomness.static UniformRandomProvider
RandomSource. unrestorable(UniformRandomProvider delegate)
Wraps the givendelegate
generator in a new instance that only provides access to theUniformRandomProvider
methods. -
Uses of UniformRandomProvider in org.apache.commons.rng.simple.internal
Fields in org.apache.commons.rng.simple.internal declared as UniformRandomProvider Modifier and Type Field Description private UniformRandomProvider
SeedUtils.UnsignedByteProvider. rng
Source of randomness.private static UniformRandomProvider
SeedFactory. SEED_GENERATOR
Generator with a long period.Fields in org.apache.commons.rng.simple.internal with type parameters of type UniformRandomProvider Modifier and Type Field Description private java.lang.Class<? extends UniformRandomProvider>
ProviderBuilder.RandomSourceInternal. rng
Source type.Methods in org.apache.commons.rng.simple.internal with parameters of type UniformRandomProvider Modifier and Type Method Description (package private) static byte[]
SeedFactory. createByteArray(UniformRandomProvider source, int n, int from, int to)
Creates an array ofbyte
numbers for use as a seed using the supplied source of randomness.protected byte[]
ProviderBuilder.RandomSourceInternal. createByteArraySeed(UniformRandomProvider source)
Creates abyte[]
seed using the provided source of randomness.(package private) static int
SeedUtils. createIntHexPermutation(UniformRandomProvider rng)
Creates anint
containing a permutation of 8 hex digits chosen from 16.(package private) static long
SeedUtils. createLongHexPermutation(UniformRandomProvider rng)
Creates along
containing a permutation of 8 hex digits chosen from 16 in the upper and lower 32-bits.byte[]
ProviderBuilder.RandomSourceInternal. createSeedBytes(UniformRandomProvider source)
Creates a seed suitable for the implementing class represented by this random source using the supplied source of randomness.(package private) static void
SeedFactory. ensureNonZero(byte[] seed, int from, int to, UniformRandomProvider source)
Ensure the seed is not all-zero within the specified sub-range.Constructors in org.apache.commons.rng.simple.internal with parameters of type UniformRandomProvider Constructor Description UnsignedByteProvider(UniformRandomProvider rng)
Constructor parameters in org.apache.commons.rng.simple.internal with type arguments of type UniformRandomProvider Constructor Description RandomSourceInternal(java.lang.Class<? extends UniformRandomProvider> rng, int nativeSeedSize, int notAllZeroFrom, int notAllZeroTo, NativeSeedType nativeSeedType, java.lang.Class<?>... args)
Create a new instance.RandomSourceInternal(java.lang.Class<? extends UniformRandomProvider> rng, int nativeSeedSize, NativeSeedType nativeSeedType, java.lang.Class<?>... args)
Create a new instance.
-