[
https://issues.apache.org/jira/browse/STATISTICS-93?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Alex Herbert resolved STATISTICS-93.
------------------------------------
Fix Version/s: 1.3
Resolution: Implemented
> TruncatedNormalDistribution: add methods to expose construction parameters
> --------------------------------------------------------------------------
>
> Key: STATISTICS-93
> URL: https://issues.apache.org/jira/browse/STATISTICS-93
> Project: Commons Statistics
> Issue Type: Improvement
> Components: distribution
> Affects Versions: 1.0
> Reporter: Kevin Milner
> Priority: Minor
> Fix For: 1.3
>
>
> TruncatedNormalDistribution doesn't expose the parameters used to construct
> it. As far as I can tell, it's the only distribution that doesn't currently
> expose all of the necessary information to reconstruct it.
> My use case is that I'm interested in creating a Gson TypeAdapter in my
> projects that can [de]serialize these distributions, but the current
> TruncatedNormalDistribution cannot be serialized without an extra abstraction
> layer or using reflection.
> I propose adding:
> {code:java}
> public double getParentMean();
> public double getParentStandardDeviation();{code}
> and/or adding:
> {code:java}
> public NormalDistribution getParentDistribution(); {code}
> This is in line with other distributions that provide getters for parameters
> not in the ContinuousDistribution interface, e.g.,
> NormalDistribution.getStandardDeviation() or LogNormalDistribution.getMu().
> I'm happy to make a PR for this, but wanted to run it by you first. Also feel
> free to make the change yourself if you agree and would prefer to bypass the
> external PR steps.
> Thanks for your consideration!
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)