You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Dennis Hendriks (JIRA)" <ji...@apache.org> on 2013/01/04 12:40:12 UTC

[jira] [Updated] (MATH-927) GammaDistribution cloning broken

     [ https://issues.apache.org/jira/browse/MATH-927?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dennis Hendriks updated MATH-927:
---------------------------------

    Attachment: DistributionCloneTests.java

Unit test to show the problem.
                
> GammaDistribution cloning broken
> --------------------------------
>
>                 Key: MATH-927
>                 URL: https://issues.apache.org/jira/browse/MATH-927
>             Project: Commons Math
>          Issue Type: Bug
>    Affects Versions: 3.1
>            Reporter: Dennis Hendriks
>         Attachments: DistributionCloneTests.java
>
>
> Serializing a GammaDistribution and deserializing it, does not result in a cloned distribution that produces the same samples.
> Cause: GammaDistribution inherits from AbstractRealDistribution, which implements Serializable. AbstractRealDistribution has random, in which we have a Well19937c instance, which inherits from AbstractWell. AbstractWell implements Serializable. AbstractWell inherits from BitsStreamGenerator, which is not Serializable, but does have a private field 'nextGaussian'.
> Solution: Make BitStreamGenerator implement Serializable as well.
> This probably affects other distributions as well.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira