commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gilles (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (MATH-1344) "ZipfDistribution" cleanup
Date Sun, 20 Mar 2016 18:05:33 GMT

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

Gilles updated MATH-1344:
-------------------------
    Issue Type: Sub-task  (was: Improvement)
        Parent: MATH-1345

> "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
>             Fix For: 4.0
>
>
> * 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
(v6.3.4#6332)

Mime
View raw message