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

Gilles resolved MATH-1344.
--------------------------
       Resolution: Won't Fix
    Fix Version/s:     (was: 4.0)

Outdated.

Sampler algorithm is now part of ["Commons 
RNG"|https://git1-us-west.apache.org/repos/asf?p=commons-rng.git;a=blob;f=commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/RejectionInversionZipfSampler.java;h=90ef8b9641023668aa8485c750a52fd70c86a4d3;hb=HEAD]
 and {{ZipfDistribution}} is part of ["Commons 
Statistics"|https://git1-us-west.apache.org/repos/asf?p=commons-statistics.git;a=blob;f=commons-statistics-distribution/src/main/java/commons/statistics/distribution/ZipfDistribution.java;h=f0d54a1cb77075f050614e96121e8dc9b056a659;hb=HEAD].

> "ZipfDistribution" cleanup
> --------------------------
>
>                 Key: MATH-1344
>                 URL: https://issues.apache.org/jira/browse/MATH-1344
>             Project: Commons Math
>          Issue Type: Sub-task
>            Reporter: Gilles
>            Priority: Minor
>              Labels: cleanup, performance, private
>
> * We should avoid hard-coded numbers.
> * Inner class {{ZipfRejectionInversionSampler}} should be private.
> It is in package scope only for the sake of testing "helper" functions that 
> are not specific to that implementation.
> * The helper functions are
> {noformat}
> log1p(x) / x
> {noformat}
> and
> {noformat}
> expm1(x) / x
> {noformat}
> but with a special code path if x < 1e-8, where the Taylor expansion
> is used.
> If this leads to more correct results (or is more efficient), it should be 
> used generally by moving the optimization to the corresponding "function 
> object" defined in {{o.a.c.m.analysis.function}} (as is done for e.g. the 
> {{Sinc}} function).



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to