Skip to content

Commit

Permalink
Use a ZigguratSampler.NormalizedGaussian
Browse files Browse the repository at this point in the history
  • Loading branch information
aherbert committed Sep 17, 2021
1 parent d16e1b4 commit dcdd7e0
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import org.apache.commons.numbers.gamma.Erfc;
import org.apache.commons.rng.UniformRandomProvider;
import org.apache.commons.rng.sampling.distribution.LogNormalSampler;
import org.apache.commons.rng.sampling.distribution.ZigguratNormalizedGaussianSampler;
import org.apache.commons.rng.sampling.distribution.ZigguratSampler;

/**
* Implementation of the <a href="http://en.wikipedia.org/wiki/Log-normal_distribution">log-normal distribution</a>.
Expand Down Expand Up @@ -254,6 +254,6 @@ public boolean isSupportConnected() {
@Override
public ContinuousDistribution.Sampler createSampler(final UniformRandomProvider rng) {
// Log normal distribution sampler.
return LogNormalSampler.of(ZigguratNormalizedGaussianSampler.of(rng), mu, sigma)::sample;
return LogNormalSampler.of(ZigguratSampler.NormalizedGaussian.of(rng), mu, sigma)::sample;
}
}

0 comments on commit dcdd7e0

Please sign in to comment.