[
https://issues.apache.org/jira/browse/NUMBERS-167?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17426671#comment-17426671
]
Alex Herbert commented on NUMBERS-167:
--------------------------------------
{quote}sparing a single redundant computation in this hypothetical use-case
{quote}
The use case is the PoissonDistribution. It uses P and Q to compute the CDF and
survival function. However it is only a few bytes of memory to hold two
functional references rather than the argument X (which is the Poisson mean).
I prefer the method reference version. I was wondering about returning a class
that allows you to call either P or Q with the argument. However this would be
over complicating things. It may be too convoluted when applying a similar
extension to the 3 argument RegularizedBeta function.
> RegularizedGamma.P with precomputed LogGamma value
> --------------------------------------------------
>
> Key: NUMBERS-167
> URL: https://issues.apache.org/jira/browse/NUMBERS-167
> Project: Commons Numbers
> Issue Type: Wish
> Components: gamma
> Reporter: Gilles Sadowski
> Priority: Minor
> Fix For: 1.1
>
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> We have
> {code:java}
> double v = RegularizedGamma.P.value(a, x);
> {code}
> where method {{value}} internally calls {{LogGamma.value(a)}}.
> There is a use-case for
> {code:java}
> double logGammaA = LogGamma.value(a);
> double v = RegularizedGamma.P.value(a, x, logGammaA);
> {code}
> for when the user varies {{x}} but not {{a}}.
> Method name TBD: Another overload of {{value}} may be confusing (?).
--
This message was sent by Atlassian Jira
(v8.3.4#803005)