All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Refactored nextIntTriple to simplify logic, based on suggestion from anonymous reviewer of journal article submission. No impact on performance of array version of method, but code easier to read. Version that returns a record a few nanoseconds faster per call as well as easier to read.
- Improved Gaussian random number generation from ThreadLocalRandom in methods of RandomVariates class (internal change).
- Improved Gaussian random number generation in static methods of RandomVariates to choose between internal implementation of original ziggurat algorithm (for Java legacy random number generators Random and SecureRandom) or the Java API implementation of the modified ziggurat for all others (internal change).
- Improved Gaussian random number generation in EnhancedRandomGenerator class to choose between internal implementation of original ziggurat algorithm (for Java legacy random number generator Random) or the Java API implementation of the modified ziggurat for all others (internal change).
- Added missing overrides in EnhancedSplittableRandom of the rngs and erngs methods.
- Added missing overrides in EnhancedJumpableRandom of the rngs and erngs methods.
BREAKING CHANGES: See Removed and Changed sections for details.
- IndexPair record class for use in methods generating pairs of random indexes.
- IndexTriple record class for use in methods generating triples of random indexes.
- Methods in the RandomIndexer and EnhancedRandomGenerator classes that utilize the new IndexPair and IndexTriple when generating combinations of distinct random integers, as an alternative to the existing methods that return arrays, including:
- Versions of nextIntPair using the new IndexPair class
- Versions of nextIntTriple using the new IndexTriple class
- Versions of nextWindowedIntPair using the new IndexPair class
- Versions of nextWindowedIntTriple using the new IndexTriple class
- Methods in the RandomIndexer and EnhancedRandomGenerator classes for generating additional combinations of distinct integers (both array-based versions and versions using IndexPair and IndexTriple), including:
- nextSortedIntPair: a variation of nextIntPair whose result is in sorted order.
- nextSortedIntTriple: a variation of nextIntTriple whose result is in sorted order.
- nextSortedWindowedIntPair: a variation of nextWindowedIntPair whose result is in sorted order.
- nextSortedWindowedIntTriple: a variation of nextWindowedIntTriple whose result is in sorted order.
- Methods in the EnhancedRandomGenerator class for generating streams of combinations of distinct integers as streams of IndexPair or IndexTriple objects, including streams of the following:
- Streams of random pairs of distinct integers (method pairs)
- Streams of random pairs of distinct sorted integers (method sortedPairs)
- Streams of random pairs of distinct integers, separated by at most a specified window (method windowedPairs)
- Streams of random pairs of distinct sorted integers, separated by at most a specified window (method sortedWindowedPairs)
- Streams of random triples of distinct integers (method triples)
- Streams of random triples of distinct sorted integers (method sortedTriples)
- Streams of random triples of distinct integers, separated by at most a specified window (method windowedTriples)
- Streams of random triples of distinct sorted integers, separated by at most a specified window (method sortedWindowedTriples)
- Shuffler class, and shuffle methods in EnhancedRandomGenerator class, for efficiently randomizing the ordering of elements in arrays and Lists.
- Changed ZigguratGaussian to a package-access class (BREAKING CHANGE): Instead use corresponding methods of the RandomVariates class.
- Refactored and optimized RandomIndexer.nextIntTriple methods.
- Refactored and optimized RandomIndexer.nextWindowedIntPair methods.
- Refactored and optimized RandomIndexer.nextWindowedIntTriple methods.
- Removed PolarGaussian (BREAKING): Instead use corresponding methods of the RandomVariates class.
- Fixed potential finalizer vulnerability in class JacobiDiagonalization, identified by SpotBugs.
- Bump org.cicirello:core from 2.5.0 to 2.7.0.
- Retired publishing of a
jar-with-dependencies
(BREAKING CHANGE only if you were using thejar-with-dependencies
).
- Deprecated PolarGaussian, in preparation for future removal.
- Deprecated ZigguratGaussian, in preparation for making it an internal package access class.
- Fixed exposed private array references in JacobiDiagonalization class.
- Reformatted source code of example programs to Google Java Style for consistency with the library itself.
- Integrated SpotBugs static analysis into build process.
- Integrated Find Security Bugs static analysis into build process.
- Removed support for importing from JitPack, iuncluding all JitPack configuration, workflows, workflow steps, and webhook.
- Configured Spotify's fmt-maven-plugin to reformat the source code of the example programs to Google style during builds (the equivalent was already in place for the library's source code).
- Refactored binomial random variate generation for improved algorithm constant caching
- MathFunctions.betai: incomplete beta function
- Statistics.p: calculates p value from a t statistic and degrees of freedom
- Bump core from 2.4.6 to 2.5.0
- Minor optimization to RandomIndexer.nextIntPair
- Bump core from 2.4.4 to 2.4.6
- Bump core from 2.4.3 to 2.4.4
- Begin publishing a jar-with-dependencies, in addition to the regular jar of the library, on deploys.
- Refactored RandomIndexer and RandomSampler to use new dependency org.cicirello.core.
- Reformatted all source code to Google Java style.
- The sample, samplePool, sampleReservoir, and sampleInsertion methods of the RandomIndexer class, which were all deprecated in 2.5.0. Instead, use the methods with the same names in the RandomSampler class introduced in 2.5.0. BREAKING CHANGE
- Added dependency org.cicirello.core 2.4.3.
- Configured refactor-first-maven-plugin in a profile within the pom.xml.
- Adopted Google Java style.
- Configured Spotify's fmt-maven-plugin in pom.xml to reformat to Google style during builds.
- RandomSampler: sampling without replacement from set of integers. This class has been extracted from the RandomIndexer class.
- Refactored RandomIndexer class to decrease cyclomatic complexity, improve maintainability and reduce redundancy.
- Refactored Statistics class, extracting an internal helper class InternalStatistics (motivated by Sonatype Lift's technical debt scan).
- Refactored MatrixOps class (motivated by Sonatype Lift's technical debt scan).
- Refactored test cases based on suggestion from Sonatype Lift's technical debt scan.
- The sample, samplePool, sampleReservoir, and sampleInsertion methods of the RandomIndexer class. The equivalents of all of these are available in the new RandomSampler class.
- Release to push out documentation fix. No functional changes in this release to the library itself.
- No functional changes in this release: 2.4.1 is functionality equivalent to 2.4.0.
- Release to push update to metadata out to Zenodo archive with citation details of JOSS article.
- Documentation update to module page with citation details of JOSS article.
- Directory of example programs added to the GitHub repository, including:
- Examples of the basic usage of the EnhancedRandomGenerator class, including potential use as a drop-in replacement, as well as demonstrations of enhancements to existing methods of Java's RandomGenerators, as well as functionality added by the class.
- Demonstration of speed advantage of enhanced nextInt(bound) over Java API's builtin method.
- Demonstration of ultrafast nextBiasedInt(bound) for cases where strict uniformity not needed.
- First release available via JitPack after configuring builds. No actual changes to library. In addition to Maven Central and GitHub Packages, the library can now be imported from JitPack as a fall-back option, as well as a source of snapshot artifacts built from the current default branch or specific commit hashes.
- Updated documentation on the module page.
- Streams of integers from binomial distributions.
- Streams of doubles from Cauchy distributions.
- Streams of doubles from exponential distributions.
- Streams of doubles from Gaussian distributions.
- Streams of not strictly uniform random integers.
- Seeded constructors for the EnhancedSplittableGenerator, EnhancedStreamableGenerator, and EnhancedRandomGenerator classes.
- Default constructors for the EnhancedStreamableGenerator and EnhancedSplittableGenerator classes.
- Subclasses of EnhancedRandomGenerator as wrappers for objects that implement the subinterfaces
of RandomGenerator enabling adding to those objects all of the functionality of the
RandomIndexer and RandomVariates classes. The new subclasses of EnhancedRandomGenerator include:
- EnhancedSplittableGenerator, which is a wrapper for RandomGenerator.SplittableGenerator,
- EnhancedJumpableGenerator, which is a wrapper for RandomGenerator.JumpableGenerator,
- EnhancedLeapableGenerator, which is a wrapper for RandomGenerator.LeapableGenerator,
- EnhancedStreamableGenerator, which is a wrapper for RandomGenerator.StreamableGenerator, and
- EnhancedArbitrarilyJumpableGenerator, which is a wrapper for RandomGenerator.ArbitrarilyJumpableGenerator.
- EnhancedRandomGenerator class: wrapper for objects of classes that implement RandomGenerator, adding to those objects all of the functionality of the RandomIndexer and RandomVariates classes.
Breaking Changes Contains breaking changes, including increasing minimum supported Java version to Java 17.
- Minimum supported Java version is now Java 17.
- Refactored all classes in package org.cicirello.math.rand to use Java 17's new RandomGenerator interface.
- Migrated test cases to JUnit Jupiter 5.8.2.
- Statistics.stdev(int[]) and Statistics.stdev(double[]) methods for sample standard deviation.
- Added automated commenting of test coverage percentages to CI/CD workflow.
- Gaussian random number generators, specifically integrated the implementations from the Chips-n-Salsa library.
- This library provides the Java module org.cicirello.rho_mu, which includes the
following packages in this initial release, all of which originated with the
JavaPermutationTools library:
- org.cicirello.math: Math functions needed by other functionality.
- org.cicirello.math.la: Linear algebra related.
- org.cicirello.math.rand: Efficient random sampling of single, pair, and triples of array indexes, as well as other randomization related functionality such as distributions other than random.
- org.cicirello.math.stats: Statistics related functionality.