Giter Site home page Giter Site logo

cicirello / rho-mu Goto Github PK

View Code? Open in Web Editor NEW
2.0 3.0 3.0 2.16 MB

ρμ - a Java library of Randomization enHancements and Other Math Utilities

Home Page: https://rho-mu.cicirello.org

License: GNU General Public License v3.0

Java 100.00%
randomizer randomization gaussian cauchy binomial pseudorandom random-numbers

rho-mu's People

Stargazers

 avatar

Watchers

 avatar  avatar

rho-mu's Issues

Use Java 17 RandomGenerator interface to consolidate duplicate code

Java 17 introduced a RandomGenerator interface that all random number generators implement. Use this to remove redundancy (currently, there are 2 versions of most methods, one that expects a Random and one a SplittableRandom). For each such case, replace with single method that expects a RandomGenerator).

Added benefit is that doing so enables supporting all of the new random number generators introduced in Java 17.

This will be a breaking change requiring bumping major version number.

Remove deprecated sampling methods of RandomIndexer class

Summary

In #121, it is proposed that the sampling methods of RandomIndexer are moved to a new class, and that the existing methods are deprecated in the planned release of 2.5.0. This issue concerns the future removal of those deprecated methods. They should be removed in version 3.0.0. This will be a BREAKING CHANGE. This is part of #119.

Update UML diagram in API docs on website

Summary

The README already has an updated UML diagram as a mermaid diagram. But the diagram on the website in the javadocs doesn't include the new RandomSampler class. Update this.

Wrapper class of RandomGenerator.JumpableGenerator

Summary

Add a class to wrap objects of RandomGenerator.JumpableGenerator to add the enhanced functionality of EnhancedRandomGenerator. The new class should be a subclass of the wrapper of RandomGenerator.StreamableGenerator (see #44).

Document source article of insertion sampling algorithm

Summary

The details of the Insertion Sampling algorithm implemented by the sampleInsertion method of RandomIndexer and EnhancedRandomGenerator are described in an article about to appear in the journal Applied Sciences, article titled "Cycle Mutation: Evolving Permutations via Cycle Induction." Reference this article in the javadoc comments of those methods.

Additionally, the composite sampling approach of the sample method of those same classes is a composite of three algorithms, including the above. Check the comments to see if they need editing.

Wrapper of RandomGenerator.LeapableGenerator

Summary

Add a class to wrap objects of RandomGenerator.LeapableGenerator to add the enhanced functionality of EnhancedRandomGenerator. The new class should be a subclass of the wrapper of RandomGenerator.JumpableGenerator (see #47).

Fix Sonatype Lift configuration

Summary

The configuration file for Sonatype Lift includes an unnecessary exclusion for the source code of the test cases. The default exclusions should cover that.

Configure JitPack builds as alternate source of artifacts

Summary

Library currently released via Maven Central and GitHub Packages. Configure builds for JitPack to provide a backup source of artifacts. This will also provide a convenient approach to snapshot builds since JitPack will build the default branch on demand.

Wrapper class for RandomGenerator interface

Create a wrapper class for objects implementing RandomGenerator with that wrapper likewise implementing RandomGenerator. Use methods of rho mu's RandomIndexer and RandomVariates classes where appropriate, and delegate remaining functionality to wrapped object. Add all functionality of RandomIndexer and RandomVariates.

Result will be a drop in replacement for existing Java random number classes but with rho mu's enhancements.

Remove old "since" tags in javadoc comments

Summary
RandomIndexer originated in another project and has "since" tags that are not relevant, mentioning versions of a different project. Remove these and check other classes for this.

Migrate rho mu to Java 17

Summary
Java 17 introduced a RandomGenerator interface, as well as expanded support for a variety of pseudorandom number generators. Upgrade minimum supported Java version to Java 17 to get access to the new features. This includes:

  • migrating local build to Java 17
  • updating maven pom.xml
  • testing existing codebase against Java 17
  • updating GitHub Actions workflows to Java 17

Seeded constructors for EnhancedSplittableGenerator, EnhancedStreamableGenerator, EnhancedRandomGenerator

Summary

Add constructors with seed to EnhancedSplittableGenerator, EnhancedStreamableGenerator, EnhancedRandomGenerator classes. When seeded constructor used, wrap a SplittableRandom object since that class is considered legacy by the JDK and thus will supposedly stick around long term, and it is also the fastest of the only two options currently available that allow the seed to be specified. Note at the present time it is not feasible to provide seeded constructors for the other subclasses of EnhancedRandomGenerator.

Wrapper class of RandomGenerator.SplittableGenerator

Summary

Add a class to wrap objects of RandomGenerator.SplittableGenerator to add the enhanced functionality of EnhancedRandomGenerator. The new class should be a subclass of the wrapper of RandomGenerator.StreamableGenerator (see #44).

Refactor to utilize org.cicirello.core 2.4.0

Summary

Refactor the classes of package org.cicirello.math.rand to use the new functionality of org.cicirello.core v2.4.0 (e.g., ArrayFiller and ArrayMinimumLengthEnforcer). This will require adding a dependency on org.cicirello.core 2.4.0.

Extract sampling methods from RandomIndexer to separate class

Summary

The RandomIndexer class currently has a very high weighted method count. Although the various sampling methods (e.g., sample, sampleReservoir, samplePool, sampleInsertion, etc) are somewhat related to the rest of the functionality offered by this class, those methods are a bit different in purpose than the rest. This issue requests the following:

  1. Extract all of the sample methods for generating random samples without replacement to a new class perhaps named RandomSampler.
  2. Temporarily keep the existing methods in RandomIndexer, but delegate the work to the proposed RandomSampler class.
  3. Deprecate the existing methods in RandomIndexer, rather than removing (for now).
  4. All uses of the existing methods from other parts of the library should be switched to the methods of the proposed new class.

This will also help work toward achieving #119.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.