Apache Commons RNG Release Notes
New "TSampler" class to sample from Student's t-distribution.
Update "LogNormalSampler" and "BoxMullerLogNormalSampler" to allow a negative mean for
the natural logarithm of the distribution values.
"RejectionInversionZipfSampler": Allow a zero exponent in the Zipf sampler.
"ZigguratSampler": Performance improvement using ternary operator to sort values.
Update test suite to JUnit 5.
Simplify assertions with simpler equivalent.
Update the minimum Java version to 1.8.
"ZigguratSampler.NormalizedGaussian": Performance improvement by extracting ziggurat
edge sampling to a separate method.
"ZigguratSampler.NormalizedGaussian": Corrected biased sampling within convex regions
at the edge of the ziggurat.
New "DirichletSampler" class to sample from a Dirichlet distribution.
"UnitSphereSampler": Deprecate public constructor. Use the factory constructor to create
an optimal sampler.
New "StableSampler" class to sample from a stable distribution.
New "CompositeSamplers" class to sample from a weighted combination of samplers.
New "LongSampler" interface for sampling a long. New "UniformLongSampler" to sample
from a range.
"ZigguratNormalizedGaussianSampler": Update to a table size of 256.
Update samplers to use ZigguratSampler.NormalizedGaussian for Gaussian deviates.
"GaussianSampler": Prevent infinite mean and standard deviation.
Update Gaussian samplers to avoid infinity in the tails of the distribution. Applies
to: ZigguratNormalisedGaussianSampler; BoxMullerNormalizedGaussianSampler; and
BoxMullerGaussianSampler.
"UnitBallSampler": Update to use the ZigguratSampler for an exponential deviate for
ball point picking.
Update "LargeMeanPoissonSampler" and "GeometricSampler" to use the ZigguratSampler for
exponential deviates.
New "ZigguratSampler" implementation of the modified "Ziggurat" algorithm for
Gaussian and exponential sampling.
New "LevySampler" to sample from a Levy distribution.
"ContinuousUniformSampler": Add optional support for an open interval: (lower, upper).
"AhrensDieterExponentialSampler": Avoid possible infinite loop during sampling if the
underlying UniformRandomProvider creates a zero for the uniform deviate.
"RandomSource": Add an instance create method. Deprecate the static create method.
New "ObjectSampler<T>" and "SharedStateObjectSampler<T>" interfaces.
These interfaces are implemented by samplers returning an object.
This changes the functional compatibility of existing samplers that implement
SharedStatedSampler<R>: CollectionSampler<T>; CombinationSampler;
DiscreteProbabilityCollectionSampler<T>; PermutationSampler; and UnitSphereSampler.
The method signature of the SharedStateSampler<R> interface remains
'public R withUniformRandomProvider(UniformRandomProvider)'. The result can still be
assigned to an instance of the same class R; it can no longer be assigned to an instance of
SharedStatedSampler<R>. It can now be assigned to SharedStateObjectSampler<T>
which can be used to generate samples of type <T>.
Code that assigned to SharedStatedSampler<R> should be updated.
New "TetrahedronSampler" to sample uniformly from a tetrahedron.
New "BoxSampler" to sample uniformly from a box (or hyperrectangle).
New "LineSampler" to sample uniformly on a line segment.
New "TriangleSampler" to sample uniformly from a triangle.
New "o.a.c.rng.sampling.shape" package for sampling coordinates from shapes.
"UnitSphereSampler": Fix 1 dimension sampling to only return vectors containing 1 or -1.
"UnitSphereSampler": Improve performance with specialisations for low order dimensions.
Added a factory constructor to create the sampler.
New "UnitBallSampler" to generate coordinates uniformly within an n-unit ball.
"PoissonSamplerCache": Method to return a SharedStateDiscreteSampler.
Add fixed increment versions of the PCG generators.
"SeedFactory": Use XoRoShiRo1024PlusPlus as the default source of randomness.
"ChengBetaSampler": Algorithms for different distribution parameters have
been delegated to specialised classes.
Update security of serialization code for java.util.Random instances. Implement
look-ahead deserialization or remove the use of ObjectInputStream.readObject().
"SplitMix64": Added primitive long constructor.
Additional "XorShiRo" family generators. This adds 4 PlusPlus general purpose variants
of existing generators and 3 variants of a large state (1024-bit) generator.
Add LongJumpable support to XoShiRo generators previously only supporting Jumpable.
"RandomSource": Support creating a byte[] seed suitable for the implementing
generator class.
"RandomSource": Expose interfaces supported by the implementing generator class
with methods isJumpable() and isLongJumpable().
New "JenkinsSmallFast32" and "JenkinsSmallFast64" generators.
"ListSampler": Select the shuffle algorithm based on the list type. This improves
performance for non-RandomAccess lists such as LinkedList.
"JDKRandomWrapper": Wraps an instance of java.util.Random for use as a
UniformRandomProvider. Can wrap a SecureRandom to use functionality
provided by the JDK for cryptographic random numbers and platform dependent
features such as reading /dev/urandom on Linux.
"JDKRandom": Fixed the restore state method to function when the instance has not
previously been used to save state.
New "DotyHumphreySmallFastCounting32" and "DotyHumphreySmallFastCounting64" generators.
"DiscreteProbabilityCollectionSampler": Use a faster enumerated probability
distribution sampler to replace the binary search algorithm.
New "MiddleSquareWeylSequence" generator.
"BaseProvider": Updated to use faster algorithm for nextInt(int).
"DiscreteUniformSampler": Updated to use faster algorithms for generation of ranges.
Factory methods for Discrete and Continuous distribution samplers. The factory method
can choose the optimal implementation for the distribution parameters.
New Permuted Congruential Generators (PCG) from the PCG family.
Added the LCG and MCG 32 bit output versions of the XSH-RS and XSH-RR operations,
along with the 64 bit RXS-M-XS edition.
New "SharedStateSampler" interface to allow a sampler to create a new instance with
a new source of randomness. Any pre-computed state can be shared between the samplers.
Update "SeedFactory" to improve performance.
New "AliasMethodDiscreteSampler" that can sample from any discrete distribution defined
by an array of probabilities. Set-up is O(n) time and sampling is O(1) time.
New "GuideTableDiscreteSampler" that can sample from any discrete distribution defined
by an array of probabilities.
Ensure SeedFactory produces non-zero seed arrays. This avoids invalid seeding of
generators that cannot recover from a seed of zeros.
New "LongJumpableUniformRandomProvider" interface extends JumpableUniformRandomProvider
with a long jump method.
New "JumpableUniformRandomProvider" interface provides a jump method that advances
the generator a large number of steps of the output sequence in a single operation. A
copy is returned allowing repeat invocations to create a series of generators
for use in parallel computations.
"LargeMeanPoissonSampler: Switch from SmallMeanPoissonSampler to use
KempSmallMeanPoissonSampler for the fractional mean sample.
"RandomSource.create(...)": Refactor internal components to allow custom seeding routines
per random source. Improvements were made to the speed of creating generators with small
seeds.
"NumberFactory": Improve performance of int and long array to/from byte array
conversions.
New "MarsagliaTsangWangDiscreteSampler" that provides samples from a discrete
distribution stored as a look-up table using a single random integer deviate. Computes
tables for the Poisson or Binomial distributions, and generically any provided discrete
probability distribution.
"AhrensDieterMarsagliaTsangGammaSampler": Fix parameter interpretation so that alpha
is a 'shape' parameter and theta is a 'scale' parameter. This reverses the functionality
of the constructor parameters from previous versions. Dependent code should be checked
and parameters reversed to ensure existing functionality is maintained.
New "KempSmallMeanPoissonSampler" that provides Poisson samples using only 1 random
deviate per sample. This algorithm outperforms the SmallMeanPoissonSampler
when the generator is slow.
"SmallMeanPoissonSampler": Requires the Poisson probability for p(x=0) to be positive
setting an upper bound on the mean of approximately 744.44.
"LargeMeanPoissonSampler": Requires mean >= 1.
New "XorShiRo" family of generators. This adds 6 new general purpose generators with
different periods and 4 related generators with improved performance for floating-point
generation.
Update the generation performance JMH benchmarks to have a reference baseline.
"MultiplyWithCarry256": Performance improvement by advancing state one step per sample.
New "XorShift1024StarPhi" generator. This is a modified implementation of
XorShift1024Star that improves randomness of the output sequence. The XOR_SHIFT_1024_S
enum has been marked deprecated as a note to users to switch to the new
XOR_SHIFT_1024_S_PHI version.
New "ThreadLocalRandomSource" class provides thread safe access to random generators.
"NumberFactory": Evenly sample all dyadic rationals between 0 and 1.
Benchmark methods for producing nextDouble and nextFloat.
Add the methods used from UniformRandomProvider to each sampler in the sampling module.
"DiscreteUniformSampler": Algorithms for small and large integer ranges have
been delegated to specialised classes.
Add new JMH benchmark ConstructionPerformance.
Validate parameters for the distribution samplers.
"AhrensDieterMarsagliaTsangGammaSampler": Algorithms for small and large theta have
been delegated to specialised classes.
Instructions for how to build and run the examples-stress code.
New "GeometricSampler" class.
"NumberFactory": Some methods have become obsolete following RNG-57.
"PermutationSampler" and "CombinationSampler" shared code moved to a utility class.
New "CombinationSampler" class.
"PermutationSampler": Performance improvement.
Cache for using up all the bits provided by the underlying source of randomness.
Use random seeds for unit testing.
Set conservative upper bound in "LargePoissonSampler" to avoid truncation.
Use JDK's "SecureRandom" to seed the "SeedFactory".
Allow part of RNG state to be contained in base classes, e.g. to enable
caching in common code (see RNG-57).
"PoissonSampler": Performance improvement.
"ZigguratNormalizedGaussianSampler": Missing statements in least used branch.
"UnitSphereSampler": Prevent returning NaN components and forbid
negative dimension.
Class "SamplerBase" has been deprecated. It was meant for internal use
only but, through inheritance, it allows incorrect usage of the sampler
classes.
"PoissonSampler": Algorithms for small mean and large mean have
been separated into dedicated classes. Cache precomputation has
been disabled as it is only marginally used and is a performance
hit for small sampling sets.
Implementation of the "Ziggurat" algorithm for Gaussian sampling.
Use "ZigguratNormalizedGaussianSampler" within the library.
"DiscreteProbabilityCollectionSampler": Sampling from a collection of items
with user-defined probabilities (feature ported from "Commons Math").
"LogNormalSampler" with user-defined underlying "NormalizedGaussianSampler".
Following RNG-43, "BoxMullerLogNormalSampler" has been deprecated.
"UnitSphereSampler": generate random vectors isotropically located
on the surface of a sphere (feature ported from "Commons Math").
"MarsagliaNormalizedGaussianSampler": Faster variation of the
Box-Muller algorithm.
This version is used within "AhrensDieterMarsagliaTsangGammaSampler"
"MarsagliaLogNormalSampler" and "PoissonSampler" (generated sequences
will thus differ from those generated by version 1.0 of the library).
New generic "GaussianSampler" based on "NormalizedGaussianSampler"
marker interface.
Implementation of "BoxMullerNormalizedGaussianSampler" deprecates
"BoxMullerGaussianSampler".