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] (RNG-43) Base class for Log-normal samplers
Date Wed, 10 Jan 2018 15:07:00 GMT

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

Gilles commented on RNG-43:
---------------------------

Perhaps better to have
{noformat}
public class LogNormalSampler {
    public LogNormalSampler(NormalizedGaussianSampler gaussian,
                            double scale,
                            double shape) {
        // ...
    }
}
{noformat}
It avoids having to define one derived class per available implementation of {{NormalizedGaussianSampler}}.


> Base class for Log-normal samplers
> ----------------------------------
>
>                 Key: RNG-43
>                 URL: https://issues.apache.org/jira/browse/RNG-43
>             Project: Commons RNG
>          Issue Type: Improvement
>            Reporter: Gilles
>            Assignee: Gilles
>            Priority: Trivial
>             Fix For: 1.1
>
>
> In relation to RNG-41, I propose to create a {{LogNormalSampler}} base class:
> {noformat}
> class LogNormalSampler {
>     protected LogNormalSampler(NormalizedGaussianSampler gaussian,
>                                double scale,
>                                double shape) {
>         // ...
>     }
> }
> {noformat}
> Derived (public) classes will differ by the algorithm used to generate normalized Gaussian
deviates.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message