Skip to content

Utilize Java 17's RandomGenerator interface #193

@cicirello

Description

@cicirello

Summary
The Permutation class has multiple constructors that differ only in the specific source of randomness (one that takes a Random and another that takes a SplittableRandom). It also has multiple versions of methods with a similar structure. In Java 17, a new interface, RandomGenerator was introduced, which all of the random number generator classes implement. Duplicated methods and constructors that differ only in specific random number generator should be consolidated using this new interface. It will reduce redundant code. And it will also enable users of the library to use some of the newer random number generators that were added to Java. This depends on #192.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    Status

    Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions