Cache another constant in the large mean Poisson sampler
authorAlex Herbert <aherbert@apache.org>
Sat, 23 Oct 2021 20:33:39 +0000 (21:33 +0100)
committerAlex Herbert <aherbert@apache.org>
Sat, 23 Oct 2021 20:33:39 +0000 (21:33 +0100)
commitbd30c3bcb73daec9c1d9298f26363c268d6c46e8
treecb294f116675ba92c657654e941c503042d8f269
parent847140501d1221bc9fd9ee2dfa36cf11bc3ad849
Cache another constant in the large mean Poisson sampler

This avoids evaluating a constant sqrt expression in the sampling loop.
commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/LargeMeanPoissonSampler.java
src/main/resources/pmd/pmd-ruleset.xml