Re: [Math] AbstractIntegerDistribution.public double logProbability(int x) was Re: [Math] Separating Sampling from Distributions

2014-10-09 Thread Ole Ersoy
We could not yet add it to the interface due to binary / source compatibility rules, but it will be done for 4.0, see the ticket: https://issues.apache.org/jira/browse/MATH-1039 Just one more question/suggestion (Hopefully better than the earlier 50K one :) ) - would it make sense to have the d

Re: [Math] AbstractIntegerDistribution.public double logProbability(int x) was Re: [Math] Separating Sampling from Distributions

2014-10-09 Thread Ole Ersoy
We could not yet add it to the interface due to binary / source compatibility rules, but it will be done for 4.0, see the ticket: https://issues.apache.org/jira/browse/MATH-1039 OK - Thanks for the explanation. Based on the description in the ticket it seems like it would be better to have i

Re: [Math] AbstractIntegerDistribution.public double logProbability(int x) was Re: [Math] Separating Sampling from Distributions

2014-10-09 Thread Ole Ersoy
On 10/09/2014 11:07 AM, Thomas Neidhart wrote: On Thu, Oct 9, 2014 at 6:03 PM, Ole Ersoy wrote: I think that, for some distribution, the computation of log(p) is more accurate. This was a feature request from not long ago. Just pasting the method below: public double logProbabilit

Re: [Math] AbstractIntegerDistribution.public double logProbability(int x) was Re: [Math] Separating Sampling from Distributions

2014-10-09 Thread Thomas Neidhart
On Thu, Oct 9, 2014 at 6:03 PM, Ole Ersoy wrote: > I think that, for some distribution, the computation of log(p) is more accurate. This was a feature request from not long ago. >>> Just pasting the method below: >>> >>> public double logProbability(int x) { >>> retur

[Math] AbstractIntegerDistribution.public double logProbability(int x) was Re: [Math] Separating Sampling from Distributions

2014-10-09 Thread Ole Ersoy
I think that, for some distribution, the computation of log(p) is more accurate. This was a feature request from not long ago. Just pasting the method below: public double logProbability(int x) { return FastMath.log(probability(x)); } So it retrieves the probability of the

Re: [Math] Separating Sampling from Distributions

2014-10-09 Thread Thomas Neidhart
On Thu, Oct 9, 2014 at 4:43 PM, Ole Ersoy wrote: > > > On 10/09/2014 08:43 AM, Gilles wrote: > >> On Thu, 09 Oct 2014 08:12:06 -0500, Ole Ersoy wrote: >> >>> Hello, >>> >>> Just sharing a few more thoughts on this WRT: >>> https://issues.apache.org/jira/browse/MATH-1124 >>> >>> (1) The issues cur

Re: [Math] Separating Sampling from Distributions

2014-10-09 Thread Ole Ersoy
On 10/09/2014 08:43 AM, Gilles wrote: On Thu, 09 Oct 2014 08:12:06 -0500, Ole Ersoy wrote: Hello, Just sharing a few more thoughts on this WRT: https://issues.apache.org/jira/browse/MATH-1124 (1) The issues currently are: You have to inject an RNG when using the constructor lengthening insta

Re: [Math] Separating Sampling from Distributions

2014-10-09 Thread Gilles
On Thu, 09 Oct 2014 08:12:06 -0500, Ole Ersoy wrote: Hello, Just sharing a few more thoughts on this WRT: https://issues.apache.org/jira/browse/MATH-1124 (1) The issues currently are: You have to inject an RNG when using the constructor lengthening instantiation time and possibly increasing mem

[Math] Separating Sampling from Distributions

2014-10-09 Thread Ole Ersoy
Hello, Just sharing a few more thoughts on this WRT: https://issues.apache.org/jira/browse/MATH-1124 (1) The issues currently are: You have to inject an RNG when using the constructor lengthening instantiation time and possibly increasing memory usage without benefit. (2) The design of the dis