List of usage examples for org.apache.commons.math3.distribution RealDistribution reseedRandomGenerator
void reseedRandomGenerator(long seed);
From source file:org.apache.beam.sdk.io.synthetic.SyntheticOptions.java
public static Sampler fromRealDistribution(final RealDistribution dist) { return new Sampler() { private static final long serialVersionUID = 0L; @Override//from w w w . j a v a 2 s.c om public double sample(long seed) { dist.reseedRandomGenerator(seed); return dist.sample(); } @Override public Object getDistribution() { return dist; } }; }