You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Alex Herbert <ah...@apache.org> on 2022/10/11 09:51:15 UTC
[ANNOUNCE] Apache Commons RNG 1.5 released
The Apache Commons Team is pleased to announce the availability of
version 1.5 of "Apache Commons RNG".
Apache Commons RNG provides Java implementations of pseudo-random
numbers generators.
Changes in this version include:
New features:
o RNG-182: Add a Bill of Materials (BOM) to aid in dependency management when
referencing multiple Apache Commons RNG artifacts. The BOM should be
used to ensure all imported artifacts are compatible.
o RNG-181: LXM family to support SplittableUniformRandomProvider. This allows
creating a parallel stream of generators which will avoid sequence
correlations between instances.
o RNG-180: New "SplittableUniformRandomProvider" interface to allow splitting a
RNG into two objects, each of which implements the same interface
(and can be recursively split indefinitely). Add default methods to
support parallel stream implementations of the UniformRandomProvider
stream methods.
o RNG-179: "FastLoadedDiceRollerDiscreteSampler": Distribution sampler that uses
the Fast Loaded Dice Roller (FLDR) algorithm for exact sampling from
a discrete probability distribution.
o RNG-178: "JumpableUniformRandomProvider": Add support to generate Java 8
streams of new random generator instances using the jump method.
o RNG-176: "UniformRandomProvider": Enhance the interface with default methods.
Add range sample methods with a lower and upper bound. Add support to
generate Java 8 streams of sample values. Note: This moves some
method implementations from the core module to the client-api module.
Binary compatibility is supported if the versions of these modules
are matched. Users of the simple module should ensure the client-api
and core modules are resolved as matched versions and not mismatched
by transitive dependency resolution.
o RNG-177: "sampling": Add samples() method to the API to generate Java 8
streams of sample values.
o RNG-168: New LXM family of random generators. Added implementations of the
LXM generators included in JDK 17.
o RNG-174: "RandomSource": Improve support for non-zero seeds. Seeding has been
changed to specify a sub-range of the seed that must not be all zero.
Introduces a functional change where byte[] seeds generated by
RandomSource with a fixed UniformRandomProvider may be different.
Seeds are now reproducible across calls using an input random source
in an identical state.
o RNG-173: "BaseProvider": Add a static method to extend input int[] and long[]
seeds to a minimum length.
o RNG-167: New "TSampler" class to sample from Student's t-distribution.
Fixed Bugs:
o RNG-175: "RandomSource.MSWS": createSeed(UniformRandomProvider) to handle a
bad RNG. This fixes an infinite loop when the RNG output is not
suitably random to create a seed.
o RNG-170: Update implementations of "UniformRandomProvider.nextBytes" with a
range [start, start + length) to be consistent with the exception
conditions of the JDK array range checks.
o RNG-166: Update "LogNormalSampler" and "BoxMullerLogNormalSampler" to allow a
negative mean for the natural logarithm of the distribution values.
o RNG-165: "RejectionInversionZipfSampler": Allow a zero exponent in the Zipf
sampler.
Changes:
o RNG-171: Reduce the memory footprint of the cached boolean and int source for
the IntProvider and LongProvider. This change has a performance
improvement on some JDKs. Note: This introduces a functional
compatibility change to the output from the nextInt method of any
LongProvider; the output is now little-endian as each long is
returned as the low 32-bits then the high 32-bits. The bit output
from nextBoolean is unchanged (little-endian order).
o RNG-172: "UniformLongSampler": Precompute rejection threshold for a non-power
of 2 range.
o RNG-169: "RandomSource.create": Update array seed conversion to use optimum
seed length. Avoid duplication of input bytes and conversion of bytes
that will be discarded. This introduces a behavioural change for
int[], long[], and int seed conversions. Any fixed seeds used in
previous versions in byte[], long or the native seed type will create
the same RNG state. All array-to-array seed conversions now use
little endian format, matching the byte[] conversion behaviour
since 1.0. All seed conversions that expand the seed size use the
same generation method to provide additional bytes. Conversion of
int[] to long avoids loss of bits changing the possible output seeds
from 2^32 to 2^64.
o RNG-160: "ZigguratSampler": Performance improvement using ternary operator to
sort values.
Historical list of changes:
https://commons.apache.org/proper/commons-rng/changes-report.html
For complete information on Apache Commons RNG, including instructions on how
to submit bug reports, patches, or suggestions for improvement, see the
Apache Commons RNG website:
https://commons.apache.org/proper/commons-rng/
Distribution packages can be downloaded from
https://commons.apache.org/proper/commons-rng/download_rng.cgi
When downloading, please verify signatures using the KEYS file
available at
https://www.apache.org/dist/commons/KEYS
Maven artifacts are also available in the central Maven repository:
https://repo.maven.apache.org/maven2/org/apache/commons/
----
<groupId>org.apache.commons</groupId>
<artifactId>commons-rng-client-api</artifactId>
<version>1.5</version>
----
<groupId>org.apache.commons</groupId>
<artifactId>commons-rng-simple</artifactId>
<version>1.5</version>
----
<groupId>org.apache.commons</groupId>
<artifactId>commons-rng-sampling</artifactId>
<version>1.5</version>
----
The Apache Commons Team
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org