[
https://issues.apache.org/jira/browse/MATH-1276?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14804592#comment-14804592
]
Gilles commented on MATH-1276:
------------------------------
I'd suggest that the clean-up of the current code is done in a separate commit:
* remove needless declaration of a local variable "p" with the same value as
the "probabilityOfSuccess" field
* remove needless local variable "ret" ("return" statements can be used
directly in each way of the alternatives).
* define new instance variable "log1mProbabilityOfSuccess"
* define new instance variable "logProbabilityOfSuccess" (not in the proposed
patch but would be a similar improvement as the above)
The change in method "probability" should be in a separate commit too.
Personally, I think that "reading noise" is lowered by not using unnecessary
number "suffixes": "1" rather than "1.0" or "1.".
> Override GeometricDistribution.inverseCumulativeProbability() to speed up
> sampling
> ----------------------------------------------------------------------------------
>
> Key: MATH-1276
> URL: https://issues.apache.org/jira/browse/MATH-1276
> Project: Commons Math
> Issue Type: Improvement
> Reporter: Otmar Ertl
> Attachments: MATH-1276.patch
>
>
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)