Hello. Le mer. 13 févr. 2019 à 17:20, <aherb...@apache.org> a écrit : > > This is an automated email from the ASF dual-hosted git repository. > > aherbert pushed a commit to branch master > in repository https://gitbox.apache.org/repos/asf/commons-rng.git > > commit 367f022a88dedf2b79778f18ad1ed3ec655fffe8 > Author: aherbert <aherb...@apache.org> > AuthorDate: Wed Feb 13 16:20:21 2019 +0000 > > The commons-math distributions can use a null random generator
Not a good move, I 'd think: this constructor has disappeared from the development version of CM.[1] Regards, Gilles [1] http://commons.apache.org/proper/commons-math/apidocs/org/apache/commons/math4/distribution/NormalDistribution.html > --- > .../distribution/ContinuousSamplersList.java | 74 > ++++++++++++---------- > .../distribution/DiscreteSamplersList.java | 39 +++++++----- > 2 files changed, 61 insertions(+), 52 deletions(-) > > diff --git > a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/ContinuousSamplersList.java > > b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/ContinuousSamplersList.java > index 58a2328..1cf4313 100644 > --- > a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/ContinuousSamplersList.java > +++ > b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/ContinuousSamplersList.java > @@ -33,172 +33,176 @@ public class ContinuousSamplersList { > > static { > try { > + // The commons-math distributions are not used for sampling so > use a null random generator > + org.apache.commons.math3.random.RandomGenerator rng = null; > + > // List of distributions to test. > > // Gaussian ("inverse method"). > final double meanNormal = -123.45; > final double sigmaNormal = 6.789; > - add(LIST, new > org.apache.commons.math3.distribution.NormalDistribution(meanNormal, > sigmaNormal), > + add(LIST, new > org.apache.commons.math3.distribution.NormalDistribution(rng, meanNormal, > sigmaNormal), > RandomSource.create(RandomSource.KISS)); > // Gaussian (DEPRECATED "Box-Muller"). > - add(LIST, new > org.apache.commons.math3.distribution.NormalDistribution(meanNormal, > sigmaNormal), > + add(LIST, new > org.apache.commons.math3.distribution.NormalDistribution(rng, meanNormal, > sigmaNormal), > new > BoxMullerGaussianSampler(RandomSource.create(RandomSource.MT), meanNormal, > sigmaNormal)); > // Gaussian ("Box-Muller"). > - add(LIST, new > org.apache.commons.math3.distribution.NormalDistribution(meanNormal, > sigmaNormal), > + add(LIST, new > org.apache.commons.math3.distribution.NormalDistribution(rng, meanNormal, > sigmaNormal), > new GaussianSampler(new > BoxMullerNormalizedGaussianSampler(RandomSource.create(RandomSource.MT)), > meanNormal, sigmaNormal)); > // Gaussian ("Marsaglia"). > - add(LIST, new > org.apache.commons.math3.distribution.NormalDistribution(meanNormal, > sigmaNormal), > + add(LIST, new > org.apache.commons.math3.distribution.NormalDistribution(rng, meanNormal, > sigmaNormal), > new GaussianSampler(new > MarsagliaNormalizedGaussianSampler(RandomSource.create(RandomSource.MT)), > meanNormal, sigmaNormal)); > // Gaussian ("Ziggurat"). > - add(LIST, new > org.apache.commons.math3.distribution.NormalDistribution(meanNormal, > sigmaNormal), > + add(LIST, new > org.apache.commons.math3.distribution.NormalDistribution(rng, meanNormal, > sigmaNormal), > new GaussianSampler(new > ZigguratNormalizedGaussianSampler(RandomSource.create(RandomSource.MT)), > meanNormal, sigmaNormal)); > > // Beta ("inverse method"). > final double alphaBeta = 4.3; > final double betaBeta = 2.1; > - add(LIST, new > org.apache.commons.math3.distribution.BetaDistribution(alphaBeta, betaBeta), > + add(LIST, new > org.apache.commons.math3.distribution.BetaDistribution(rng, alphaBeta, > betaBeta), > RandomSource.create(RandomSource.ISAAC)); > // Beta ("Cheng"). > - add(LIST, new > org.apache.commons.math3.distribution.BetaDistribution(alphaBeta, betaBeta), > + add(LIST, new > org.apache.commons.math3.distribution.BetaDistribution(rng, alphaBeta, > betaBeta), > new > ChengBetaSampler(RandomSource.create(RandomSource.MWC_256), alphaBeta, > betaBeta)); > - add(LIST, new > org.apache.commons.math3.distribution.BetaDistribution(betaBeta, alphaBeta), > + add(LIST, new > org.apache.commons.math3.distribution.BetaDistribution(rng, betaBeta, > alphaBeta), > new > ChengBetaSampler(RandomSource.create(RandomSource.WELL_19937_A), betaBeta, > alphaBeta)); > // Beta ("Cheng", alternate algorithm). > final double alphaBetaAlt = 0.5678; > final double betaBetaAlt = 0.1234; > - add(LIST, new > org.apache.commons.math3.distribution.BetaDistribution(alphaBetaAlt, > betaBetaAlt), > + add(LIST, new > org.apache.commons.math3.distribution.BetaDistribution(rng, alphaBetaAlt, > betaBetaAlt), > new > ChengBetaSampler(RandomSource.create(RandomSource.WELL_512_A), alphaBetaAlt, > betaBetaAlt)); > - add(LIST, new > org.apache.commons.math3.distribution.BetaDistribution(betaBetaAlt, > alphaBetaAlt), > + add(LIST, new > org.apache.commons.math3.distribution.BetaDistribution(rng, betaBetaAlt, > alphaBetaAlt), > new > ChengBetaSampler(RandomSource.create(RandomSource.WELL_19937_C), betaBetaAlt, > alphaBetaAlt)); > > // Cauchy ("inverse method"). > final double medianCauchy = 0.123; > final double scaleCauchy = 4.5; > - add(LIST, new > org.apache.commons.math3.distribution.CauchyDistribution(medianCauchy, > scaleCauchy), > + add(LIST, new > org.apache.commons.math3.distribution.CauchyDistribution(rng, medianCauchy, > scaleCauchy), > RandomSource.create(RandomSource.WELL_19937_C)); > > // Chi-square ("inverse method"). > final int dofChi2 = 12; > - add(LIST, new > org.apache.commons.math3.distribution.ChiSquaredDistribution(dofChi2), > + add(LIST, new > org.apache.commons.math3.distribution.ChiSquaredDistribution(rng, dofChi2), > RandomSource.create(RandomSource.WELL_19937_A)); > > // Exponential ("inverse method"). > final double meanExp = 3.45; > - add(LIST, new > org.apache.commons.math3.distribution.ExponentialDistribution(meanExp), > + add(LIST, new > org.apache.commons.math3.distribution.ExponentialDistribution(rng, meanExp), > RandomSource.create(RandomSource.WELL_44497_A)); > // Exponential. > - add(LIST, new > org.apache.commons.math3.distribution.ExponentialDistribution(meanExp), > + add(LIST, new > org.apache.commons.math3.distribution.ExponentialDistribution(rng, meanExp), > new > AhrensDieterExponentialSampler(RandomSource.create(RandomSource.MT), > meanExp)); > > // F ("inverse method"). > final int numDofF = 4; > final int denomDofF = 7; > - add(LIST, new > org.apache.commons.math3.distribution.FDistribution(numDofF, denomDofF), > + add(LIST, new > org.apache.commons.math3.distribution.FDistribution(rng, numDofF, denomDofF), > RandomSource.create(RandomSource.MT_64)); > > // Gamma ("inverse method"). > final double thetaGammaSmallerThanOne = 0.1234; > final double thetaGammaLargerThanOne = 2.345; > final double alphaGamma = 3.456; > - add(LIST, new > org.apache.commons.math3.distribution.GammaDistribution(thetaGammaLargerThanOne, > alphaGamma), > + add(LIST, new > org.apache.commons.math3.distribution.GammaDistribution(rng, > thetaGammaLargerThanOne, alphaGamma), > RandomSource.create(RandomSource.SPLIT_MIX_64)); > // Gamma (theta < 1). > - add(LIST, new > org.apache.commons.math3.distribution.GammaDistribution(thetaGammaSmallerThanOne, > alphaGamma), > + add(LIST, new > org.apache.commons.math3.distribution.GammaDistribution(rng, > thetaGammaSmallerThanOne, alphaGamma), > new > AhrensDieterMarsagliaTsangGammaSampler(RandomSource.create(RandomSource.XOR_SHIFT_1024_S), > alphaGamma, > thetaGammaSmallerThanOne)); > // Gamma (theta > 1). > - add(LIST, new > org.apache.commons.math3.distribution.GammaDistribution(thetaGammaLargerThanOne, > alphaGamma), > + add(LIST, new > org.apache.commons.math3.distribution.GammaDistribution(rng, > thetaGammaLargerThanOne, alphaGamma), > new > AhrensDieterMarsagliaTsangGammaSampler(RandomSource.create(RandomSource.WELL_44497_B), > alphaGamma, > thetaGammaLargerThanOne)); > > // Gumbel ("inverse method"). > final double muGumbel = -4.56; > final double betaGumbel = 0.123; > - add(LIST, new > org.apache.commons.math3.distribution.GumbelDistribution(muGumbel, > betaGumbel), > + add(LIST, new > org.apache.commons.math3.distribution.GumbelDistribution(rng, muGumbel, > betaGumbel), > RandomSource.create(RandomSource.WELL_1024_A)); > > // Laplace ("inverse method"). > final double muLaplace = 12.3; > final double betaLaplace = 5.6; > - add(LIST, new > org.apache.commons.math3.distribution.LaplaceDistribution(muLaplace, > betaLaplace), > + add(LIST, new > org.apache.commons.math3.distribution.LaplaceDistribution(rng, muLaplace, > betaLaplace), > RandomSource.create(RandomSource.MWC_256)); > > // Levy ("inverse method"). > final double muLevy = -1.098; > final double cLevy = 0.76; > - add(LIST, new > org.apache.commons.math3.distribution.LevyDistribution(muLevy, cLevy), > + add(LIST, new > org.apache.commons.math3.distribution.LevyDistribution(rng, muLevy, cLevy), > RandomSource.create(RandomSource.TWO_CMRES)); > > // Log normal ("inverse method"). > final double scaleLogNormal = 2.345; > final double shapeLogNormal = 0.1234; > - add(LIST, new > org.apache.commons.math3.distribution.LogNormalDistribution(scaleLogNormal, > shapeLogNormal), > + add(LIST, new > org.apache.commons.math3.distribution.LogNormalDistribution(rng, > scaleLogNormal, shapeLogNormal), > RandomSource.create(RandomSource.KISS)); > // Log-normal (DEPRECATED "Box-Muller"). > - add(LIST, new > org.apache.commons.math3.distribution.LogNormalDistribution(scaleLogNormal, > shapeLogNormal), > + add(LIST, new > org.apache.commons.math3.distribution.LogNormalDistribution(rng, > scaleLogNormal, shapeLogNormal), > new > BoxMullerLogNormalSampler(RandomSource.create(RandomSource.XOR_SHIFT_1024_S), > scaleLogNormal, shapeLogNormal)); > // Log-normal ("Box-Muller"). > - add(LIST, new > org.apache.commons.math3.distribution.LogNormalDistribution(scaleLogNormal, > shapeLogNormal), > + add(LIST, new > org.apache.commons.math3.distribution.LogNormalDistribution(rng, > scaleLogNormal, shapeLogNormal), > new LogNormalSampler(new > BoxMullerNormalizedGaussianSampler(RandomSource.create(RandomSource.XOR_SHIFT_1024_S)), > scaleLogNormal, shapeLogNormal)); > // Log-normal ("Marsaglia"). > - add(LIST, new > org.apache.commons.math3.distribution.LogNormalDistribution(scaleLogNormal, > shapeLogNormal), > + add(LIST, new > org.apache.commons.math3.distribution.LogNormalDistribution(rng, > scaleLogNormal, shapeLogNormal), > new LogNormalSampler(new > MarsagliaNormalizedGaussianSampler(RandomSource.create(RandomSource.MT_64)), > scaleLogNormal, shapeLogNormal)); > // Log-normal ("Ziggurat"). > - add(LIST, new > org.apache.commons.math3.distribution.LogNormalDistribution(scaleLogNormal, > shapeLogNormal), > + add(LIST, new > org.apache.commons.math3.distribution.LogNormalDistribution(rng, > scaleLogNormal, shapeLogNormal), > new LogNormalSampler(new > ZigguratNormalizedGaussianSampler(RandomSource.create(RandomSource.MWC_256)), > scaleLogNormal, shapeLogNormal)); > > // Logistic ("inverse method"). > final double muLogistic = -123.456; > final double sLogistic = 7.89; > - add(LIST, new > org.apache.commons.math3.distribution.LogisticDistribution(muLogistic, > sLogistic), > + add(LIST, new > org.apache.commons.math3.distribution.LogisticDistribution(rng, muLogistic, > sLogistic), > RandomSource.create(RandomSource.TWO_CMRES_SELECT, null, 2, > 6)); > > // Nakagami ("inverse method"). > final double muNakagami = 78.9; > final double omegaNakagami = 23.4; > - add(LIST, new > org.apache.commons.math3.distribution.NakagamiDistribution(muNakagami, > omegaNakagami), > + final double inverseAbsoluteAccuracyNakagami = > org.apache.commons.math3.distribution.NakagamiDistribution.DEFAULT_INVERSE_ABSOLUTE_ACCURACY; > + add(LIST, new > org.apache.commons.math3.distribution.NakagamiDistribution(rng, muNakagami, > omegaNakagami, inverseAbsoluteAccuracyNakagami), > RandomSource.create(RandomSource.TWO_CMRES_SELECT, null, 5, > 3)); > > // Pareto ("inverse method"). > final double scalePareto = 23.45; > final double shapePareto = 0.1234; > - add(LIST, new > org.apache.commons.math3.distribution.ParetoDistribution(scalePareto, > shapePareto), > + add(LIST, new > org.apache.commons.math3.distribution.ParetoDistribution(rng, scalePareto, > shapePareto), > RandomSource.create(RandomSource.TWO_CMRES_SELECT, null, 9, > 11)); > // Pareto. > - add(LIST, new > org.apache.commons.math3.distribution.ParetoDistribution(scalePareto, > shapePareto), > + add(LIST, new > org.apache.commons.math3.distribution.ParetoDistribution(rng, scalePareto, > shapePareto), > new > InverseTransformParetoSampler(RandomSource.create(RandomSource.XOR_SHIFT_1024_S), > scalePareto, shapePareto)); > > // T ("inverse method"). > final double dofT = 0.76543; > - add(LIST, new > org.apache.commons.math3.distribution.TDistribution(dofT), > + add(LIST, new > org.apache.commons.math3.distribution.TDistribution(rng, dofT), > RandomSource.create(RandomSource.ISAAC)); > > // Triangular ("inverse method"). > final double aTriangle = -0.76543; > final double cTriangle = -0.65432; > final double bTriangle = -0.54321; > - add(LIST, new > org.apache.commons.math3.distribution.TriangularDistribution(aTriangle, > cTriangle, bTriangle), > + add(LIST, new > org.apache.commons.math3.distribution.TriangularDistribution(rng, aTriangle, > cTriangle, bTriangle), > RandomSource.create(RandomSource.MT)); > > // Uniform ("inverse method"). > final double loUniform = -1.098; > final double hiUniform = 0.76; > - add(LIST, new > org.apache.commons.math3.distribution.UniformRealDistribution(loUniform, > hiUniform), > + add(LIST, new > org.apache.commons.math3.distribution.UniformRealDistribution(rng, loUniform, > hiUniform), > RandomSource.create(RandomSource.TWO_CMRES)); > // Uniform. > - add(LIST, new > org.apache.commons.math3.distribution.UniformRealDistribution(loUniform, > hiUniform), > + add(LIST, new > org.apache.commons.math3.distribution.UniformRealDistribution(rng, loUniform, > hiUniform), > new > ContinuousUniformSampler(RandomSource.create(RandomSource.MT_64), loUniform, > hiUniform)); > > // Weibull ("inverse method"). > final double alphaWeibull = 678.9; > final double betaWeibull = 98.76; > - add(LIST, new > org.apache.commons.math3.distribution.WeibullDistribution(alphaWeibull, > betaWeibull), > + add(LIST, new > org.apache.commons.math3.distribution.WeibullDistribution(rng, alphaWeibull, > betaWeibull), > RandomSource.create(RandomSource.WELL_44497_B)); > } catch (Exception e) { > System.err.println("Unexpected exception while creating the list > of samplers: " + e); > diff --git > a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/DiscreteSamplersList.java > > b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/DiscreteSamplersList.java > index 10da78d..21cd20b 100644 > --- > a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/DiscreteSamplersList.java > +++ > b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/DiscreteSamplersList.java > @@ -35,18 +35,21 @@ public class DiscreteSamplersList { > > static { > try { > + // The commons-math distributions are not used for sampling so > use a null random generator > + org.apache.commons.math3.random.RandomGenerator rng = null; > + > // List of distributions to test. > > // Binomial ("inverse method"). > final int trialsBinomial = 20; > final double probSuccessBinomial = 0.67; > - add(LIST, new > org.apache.commons.math3.distribution.BinomialDistribution(trialsBinomial, > probSuccessBinomial), > + add(LIST, new > org.apache.commons.math3.distribution.BinomialDistribution(rng, > trialsBinomial, probSuccessBinomial), > MathArrays.sequence(8, 9, 1), > RandomSource.create(RandomSource.KISS)); > > // Geometric ("inverse method"). > final double probSuccessGeometric = 0.21; > - add(LIST, new > org.apache.commons.math3.distribution.GeometricDistribution(probSuccessGeometric), > + add(LIST, new > org.apache.commons.math3.distribution.GeometricDistribution(rng, > probSuccessGeometric), > MathArrays.sequence(10, 0, 1), > RandomSource.create(RandomSource.ISAAC)); > > @@ -54,80 +57,82 @@ public class DiscreteSamplersList { > final int popSizeHyper = 34; > final int numSuccessesHyper = 11; > final int sampleSizeHyper = 12; > - add(LIST, new > org.apache.commons.math3.distribution.HypergeometricDistribution(popSizeHyper, > numSuccessesHyper, sampleSizeHyper), > + add(LIST, new > org.apache.commons.math3.distribution.HypergeometricDistribution(rng, > popSizeHyper, numSuccessesHyper, sampleSizeHyper), > MathArrays.sequence(10, 0, 1), > RandomSource.create(RandomSource.MT)); > > // Pascal ("inverse method"). > final int numSuccessesPascal = 6; > final double probSuccessPascal = 0.2; > - add(LIST, new > org.apache.commons.math3.distribution.PascalDistribution(numSuccessesPascal, > probSuccessPascal), > + add(LIST, new > org.apache.commons.math3.distribution.PascalDistribution(rng, > numSuccessesPascal, probSuccessPascal), > MathArrays.sequence(18, 1, 1), > RandomSource.create(RandomSource.TWO_CMRES)); > > // Uniform ("inverse method"). > final int loUniform = -3; > final int hiUniform = 4; > - add(LIST, new > org.apache.commons.math3.distribution.UniformIntegerDistribution(loUniform, > hiUniform), > + add(LIST, new > org.apache.commons.math3.distribution.UniformIntegerDistribution(rng, > loUniform, hiUniform), > MathArrays.sequence(8, -3, 1), > RandomSource.create(RandomSource.SPLIT_MIX_64)); > // Uniform. > - add(LIST, new > org.apache.commons.math3.distribution.UniformIntegerDistribution(loUniform, > hiUniform), > + add(LIST, new > org.apache.commons.math3.distribution.UniformIntegerDistribution(rng, > loUniform, hiUniform), > MathArrays.sequence(8, -3, 1), > new > DiscreteUniformSampler(RandomSource.create(RandomSource.MT_64), loUniform, > hiUniform)); > // Uniform (large range). > final int halfMax = Integer.MAX_VALUE / 2; > final int hiLargeUniform = halfMax + 10; > final int loLargeUniform = -hiLargeUniform; > - add(LIST, new > org.apache.commons.math3.distribution.UniformIntegerDistribution(loLargeUniform, > hiLargeUniform), > + add(LIST, new > org.apache.commons.math3.distribution.UniformIntegerDistribution(rng, > loLargeUniform, hiLargeUniform), > MathArrays.sequence(20, -halfMax, halfMax / 10), > new > DiscreteUniformSampler(RandomSource.create(RandomSource.WELL_1024_A), > loLargeUniform, hiLargeUniform)); > > // Zipf ("inverse method"). > final int numElementsZipf = 5; > final double exponentZipf = 2.345; > - add(LIST, new > org.apache.commons.math3.distribution.ZipfDistribution(numElementsZipf, > exponentZipf), > + add(LIST, new > org.apache.commons.math3.distribution.ZipfDistribution(rng, numElementsZipf, > exponentZipf), > MathArrays.sequence(5, 1, 1), > RandomSource.create(RandomSource.XOR_SHIFT_1024_S)); > // Zipf. > - add(LIST, new > org.apache.commons.math3.distribution.ZipfDistribution(numElementsZipf, > exponentZipf), > + add(LIST, new > org.apache.commons.math3.distribution.ZipfDistribution(rng, numElementsZipf, > exponentZipf), > MathArrays.sequence(5, 1, 1), > new > RejectionInversionZipfSampler(RandomSource.create(RandomSource.WELL_19937_C), > numElementsZipf, exponentZipf)); > // Zipf (exponent close to 1). > final double exponentCloseToOneZipf = 1 - 1e-10; > - add(LIST, new > org.apache.commons.math3.distribution.ZipfDistribution(numElementsZipf, > exponentCloseToOneZipf), > + add(LIST, new > org.apache.commons.math3.distribution.ZipfDistribution(rng, numElementsZipf, > exponentCloseToOneZipf), > MathArrays.sequence(5, 1, 1), > new > RejectionInversionZipfSampler(RandomSource.create(RandomSource.WELL_19937_C), > numElementsZipf, exponentCloseToOneZipf)); > > // Poisson ("inverse method"). > + final double epsilonPoisson = > org.apache.commons.math3.distribution.PoissonDistribution.DEFAULT_EPSILON; > + final int maxIterationsPoisson = > org.apache.commons.math3.distribution.PoissonDistribution.DEFAULT_MAX_ITERATIONS; > final double meanPoisson = 3.21; > - add(LIST, new > org.apache.commons.math3.distribution.PoissonDistribution(meanPoisson), > + add(LIST, new > org.apache.commons.math3.distribution.PoissonDistribution(rng, meanPoisson, > epsilonPoisson, maxIterationsPoisson), > MathArrays.sequence(10, 0, 1), > RandomSource.create(RandomSource.MWC_256)); > // Poisson. > - add(LIST, new > org.apache.commons.math3.distribution.PoissonDistribution(meanPoisson), > + add(LIST, new > org.apache.commons.math3.distribution.PoissonDistribution(rng, meanPoisson, > epsilonPoisson, maxIterationsPoisson), > MathArrays.sequence(10, 0, 1), > new PoissonSampler(RandomSource.create(RandomSource.KISS), > meanPoisson)); > // Dedicated small mean poisson sampler > - add(LIST, new > org.apache.commons.math3.distribution.PoissonDistribution(meanPoisson), > + add(LIST, new > org.apache.commons.math3.distribution.PoissonDistribution(rng, meanPoisson, > epsilonPoisson, maxIterationsPoisson), > MathArrays.sequence(10, 0, 1), > new > SmallMeanPoissonSampler(RandomSource.create(RandomSource.KISS), meanPoisson)); > // Poisson (40 < mean < 80). > final double largeMeanPoisson = 67.89; > - add(LIST, new > org.apache.commons.math3.distribution.PoissonDistribution(largeMeanPoisson), > + add(LIST, new > org.apache.commons.math3.distribution.PoissonDistribution(rng, > largeMeanPoisson, epsilonPoisson, maxIterationsPoisson), > MathArrays.sequence(50, (int) (largeMeanPoisson - 25), 1), > new > PoissonSampler(RandomSource.create(RandomSource.SPLIT_MIX_64), > largeMeanPoisson)); > // Dedicated large mean poisson sampler > - add(LIST, new > org.apache.commons.math3.distribution.PoissonDistribution(largeMeanPoisson), > + add(LIST, new > org.apache.commons.math3.distribution.PoissonDistribution(rng, > largeMeanPoisson, epsilonPoisson, maxIterationsPoisson), > MathArrays.sequence(50, (int) (largeMeanPoisson - 25), 1), > new > LargeMeanPoissonSampler(RandomSource.create(RandomSource.SPLIT_MIX_64), > largeMeanPoisson)); > // Poisson (mean >> 40). > final double veryLargeMeanPoisson = 543.21; > - add(LIST, new > org.apache.commons.math3.distribution.PoissonDistribution(veryLargeMeanPoisson), > + add(LIST, new > org.apache.commons.math3.distribution.PoissonDistribution(rng, > veryLargeMeanPoisson, epsilonPoisson, maxIterationsPoisson), > MathArrays.sequence(100, (int) (veryLargeMeanPoisson - 50), > 1), > new > PoissonSampler(RandomSource.create(RandomSource.SPLIT_MIX_64), > veryLargeMeanPoisson)); > // Dedicated large mean poisson sampler > - add(LIST, new > org.apache.commons.math3.distribution.PoissonDistribution(veryLargeMeanPoisson), > + add(LIST, new > org.apache.commons.math3.distribution.PoissonDistribution(rng, > veryLargeMeanPoisson, epsilonPoisson, maxIterationsPoisson), > MathArrays.sequence(100, (int) (veryLargeMeanPoisson - 50), > 1), > new > LargeMeanPoissonSampler(RandomSource.create(RandomSource.SPLIT_MIX_64), > veryLargeMeanPoisson)); > } catch (Exception e) { > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org