commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gilles (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (MATH-1337) RNG: New API to old API adaptor
Date Sun, 20 Mar 2016 23:23:33 GMT

    [ https://issues.apache.org/jira/browse/MATH-1337?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15203565#comment-15203565
] 

Gilles commented on MATH-1337:
------------------------------

Adaptor available on branch "feature-MATH-1335".

> 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
>              Labels: api, compatibility, deprecation, test, upgrade
>             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)

Mime
View raw message