Example usage for org.apache.commons.math3.random SynchronizedRandomGenerator setSeed

List of usage examples for org.apache.commons.math3.random SynchronizedRandomGenerator setSeed

Introduction

In this page you can find the example usage for org.apache.commons.math3.random SynchronizedRandomGenerator setSeed.

Prototype

public synchronized void setSeed(long seed) 

Source Link

Usage

From source file:com.ibm.bi.dml.runtime.util.PoissonPRNGenerator.java

public void setup(double mean, long sd) {
    seed = sd;//from www . j  a  v  a  2s. c om

    SynchronizedRandomGenerator srg = new SynchronizedRandomGenerator(new Well1024a());
    srg.setSeed(seed);
    _pdist = new PoissonDistribution(srg, _mean, PoissonDistribution.DEFAULT_EPSILON,
            PoissonDistribution.DEFAULT_MAX_ITERATIONS);
}