commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gilles (JIRA)" <>
Subject [jira] [Commented] (MATH-927) GammaDistribution cloning broken
Date Fri, 04 Jan 2013 12:32:13 GMT


Gilles commented on MATH-927:

Fixed in revision 1428822.

I've slightly modified the unit test and included it in "RealDistributionAbstractTest" so
that all current, and future, distribution implementations are automatically checked.

Thanks for the report and fix.

> GammaDistribution cloning broken
> --------------------------------
>                 Key: MATH-927
>                 URL:
>             Project: Commons Math
>          Issue Type: Bug
>    Affects Versions: 3.1
>            Reporter: Dennis Hendriks
>         Attachments: bits-stream-generator-serializable.patch,
> 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:

View raw message