Examples of Well19937c


Examples of org.apache.commons.math3.random.Well19937c

     * @param inverseCumAccuracy Inverse cumulative probability accuracy.
     * @throws NotStrictlyPositiveException if {@code scale <= 0} or {@code shape <= 0}.
     */
    public ParetoDistribution(double scale, double shape, double inverseCumAccuracy)
        throws NotStrictlyPositiveException {
        this(new Well19937c(), scale, shape, inverseCumAccuracy);
    }
View Full Code Here

Examples of org.apache.commons.math3.random.Well19937c

    private Iterator<double[]> createRandomIterator(final long numSamples) {
        return new Iterator<double[]>() {
            /** Data. */
            final Vector3D[] points = rings.getPoints();
            /** RNG. */
            final RandomGenerator rng = new Well19937c();
            /** Number of samples. */
            private long n = 0;

            /** {@inheritDoc} */
            public boolean hasNext() {
                return n < numSamples;
            }

            /** {@inheritDoc} */
            public double[] next() {
                ++n;
                return points[rng.nextInt(points.length)].toArray();
            }

            /** {@inheritDoc} */
            public void remove() {
                throw new MathUnsupportedOperationException();
View Full Code Here

Examples of org.apache.commons.math3.random.Well19937c

     */
    public FDistribution(double numeratorDegreesOfFreedom,
                         double denominatorDegreesOfFreedom,
                         double inverseCumAccuracy)
        throws NotStrictlyPositiveException {
        this(new Well19937c(), numeratorDegreesOfFreedom,
             denominatorDegreesOfFreedom, inverseCumAccuracy);
    }
View Full Code Here

Examples of org.kitesdk.morphline.shaded.org.apache.commons.math3.random.Well19937c

      if (probability >= 1.0) {
        this.prng = null;
      } else {
        if (config.hasPath("seed")) {
          long seed = getConfigs().getLong(config, "seed");
          this.prng = new Well19937c(seed); // non-secure & fast
        } else {
          Random rand = new SecureRandom();
          int[] seed = new int[624];
          for (int i = 0; i < seed.length; i++) {
            seed[i] = rand.nextInt();
          }
          this.prng = new Well19937c(seed); // non-secure & fast
        }
      }
      validateArguments();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.