You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Gilles (JIRA)" <ji...@apache.org> on 2016/03/11 21:24:03 UTC

[jira] [Created] (MATH-1337) RNG: New API to old API adaptor

Gilles created MATH-1337:
----------------------------

             Summary: RNG: New API to old API adaptor
                 Key: MATH-1337
                 URL: https://issues.apache.org/jira/browse/MATH-1337
             Project: Commons Math
          Issue Type: Test
            Reporter: Gilles
            Assignee: Gilles
            Priority: Minor
             Fix For: 4.0


An "adaptor" class will be provided for users who'd like to test the new RNG implementations (MATH-1335) before upgrading their codes to the new API.

This class will implement the old {{RandomGenerator}} interface (but will delegate all the calls to the new classes); hence the only step required in order to use the new RNGs in existing code will be the replacement of the instantiations of the old RNG classes with instantiations of the adaptor.
For example,
{noformat}
RandomGenerator rng = new Well19937c(9876);
{noformat}
could be replaced with
{noformat}
RandomGenerator rng = new RngAdaptor(RandomSource.WELL_19937_C, 9876);
{noformat}
and subsequent usage of {{rng}} would be functionally identical.




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)