Search in sources :

Example 1 with SynchronizedRandomGenerator

use of org.apache.commons.math3.random.SynchronizedRandomGenerator in project incubator-systemml by apache.

the class PoissonPRNGenerator method setup.

public void setup(double mean, long sd) {
    seed = sd;
    SynchronizedRandomGenerator srg = new SynchronizedRandomGenerator(new Well1024a());
    srg.setSeed(seed);
    _pdist = new PoissonDistribution(srg, _mean, PoissonDistribution.DEFAULT_EPSILON, PoissonDistribution.DEFAULT_MAX_ITERATIONS);
}
Also used : PoissonDistribution(org.apache.commons.math3.distribution.PoissonDistribution) SynchronizedRandomGenerator(org.apache.commons.math3.random.SynchronizedRandomGenerator) Well1024a(org.apache.commons.math3.random.Well1024a)

Aggregations

PoissonDistribution (org.apache.commons.math3.distribution.PoissonDistribution)1 SynchronizedRandomGenerator (org.apache.commons.math3.random.SynchronizedRandomGenerator)1 Well1024a (org.apache.commons.math3.random.Well1024a)1