/** * Generate a random deviate from the given distribution using the * <a href="http://en.wikipedia.org/wiki/Inverse_transform_sampling"> inversion method.</a> * * @param distribution Integer distribution to generate a random value from * @return a random value sampled from the given distribution * @throws MathIllegalArgumentException if the underlynig distribution throws one * @since 2.2 * @deprecated use the distribution's sample() method */ @Deprecated public int nextInversionDeviate(IntegerDistribution distribution) throws MathIllegalArgumentException { return distribution.inverseCumulativeProbability(nextUniform(0, 1)); }
/** {@inheritDoc} */ public void reseedRandomGenerator(long seed) { random.setSeed(seed); randomData.reSeed(seed); }
/** * Construct a ValueServer instance using a RandomDataImpl as its source * of random data. * * @param randomData the RandomDataImpl instance used to source random data * @since 3.0 * @deprecated use {@link #ValueServer(RandomGenerator)} */ @Deprecated public ValueServer(RandomDataImpl randomData) { this.randomData = randomData.getDelegate(); }
private RandomDataImpl seedRandomGenerator() { RandomDataImpl rnd = new RandomDataImpl(); rnd.reSeed(MultilayerPerceptron.SEED); rnd.reSeedSecure(MultilayerPerceptron.SEED); return rnd; }
/** * Generate a random deviate from the given distribution using the * <a href="http://en.wikipedia.org/wiki/Inverse_transform_sampling"> inversion method.</a> * * @param distribution Continuous distribution to generate a random value from * @return a random value sampled from the given distribution * @throws MathIllegalArgumentException if the underlynig distribution throws one * @since 2.2 * @deprecated use the distribution's sample() method */ @Deprecated public double nextInversionDeviate(RealDistribution distribution) throws MathIllegalArgumentException { return distribution.inverseCumulativeProbability(nextUniform(0, 1)); }
/** {@inheritDoc} */ public void reseedRandomGenerator(long seed) { random.setSeed(seed); randomData.reSeed(seed); }
/** * Creates a new EmpiricalDistribution with the specified bin count using the * provided {@link RandomDataImpl} instance as the source of random data. * * @param binCount number of bins * @param randomData random data generator (may be null, resulting in default JDK generator) * @since 3.0 * @deprecated As of 3.1. Please use {@link #EmpiricalDistribution(int,RandomGenerator)} instead. */ @Deprecated public EmpiricalDistribution(int binCount, RandomDataImpl randomData) { this(binCount, randomData.getDelegate()); }
/** * Generate a random deviate from the given distribution using the * <a href="http://en.wikipedia.org/wiki/Inverse_transform_sampling"> inversion method.</a> * * @param distribution Integer distribution to generate a random value from * @return a random value sampled from the given distribution * @throws MathIllegalArgumentException if the underlynig distribution throws one * @since 2.2 * @deprecated use the distribution's sample() method */ @Deprecated public int nextInversionDeviate(IntegerDistribution distribution) throws MathIllegalArgumentException { return distribution.inverseCumulativeProbability(nextUniform(0, 1)); }
/** {@inheritDoc} */ public void reseedRandomGenerator(long seed) { random.setSeed(seed); randomData.reSeed(seed); }
/** * Construct a ValueServer instance using a RandomDataImpl as its source * of random data. * * @param randomData the RandomDataImpl instance used to source random data * @since 3.0 * @deprecated use {@link #ValueServer(RandomGenerator)} */ @Deprecated public ValueServer(RandomDataImpl randomData) { this.randomData = randomData.getDelegate(); }
/** * Generate a random deviate from the given distribution using the * <a href="http://en.wikipedia.org/wiki/Inverse_transform_sampling"> inversion method.</a> * * @param distribution Continuous distribution to generate a random value from * @return a random value sampled from the given distribution * @throws MathIllegalArgumentException if the underlynig distribution throws one * @since 2.2 * @deprecated use the distribution's sample() method */ @Deprecated public double nextInversionDeviate(RealDistribution distribution) throws MathIllegalArgumentException { return distribution.inverseCumulativeProbability(nextUniform(0, 1)); }
/** {@inheritDoc} */ public void reseedRandomGenerator(long seed) { random.setSeed(seed); randomData.reSeed(seed); }
/** * Creates a new EmpiricalDistribution with the specified bin count using the * provided {@link RandomDataImpl} instance as the source of random data. * * @param binCount number of bins * @param randomData random data generator (may be null, resulting in default JDK generator) * @since 3.0 * @deprecated As of 3.1. Please use {@link #EmpiricalDistribution(int,RandomGenerator)} instead. */ @Deprecated public EmpiricalDistribution(int binCount, RandomDataImpl randomData) { this(binCount, randomData.getDelegate()); }
/** * Generate a random deviate from the given distribution using the * <a href="http://en.wikipedia.org/wiki/Inverse_transform_sampling"> inversion method.</a> * * @param distribution Continuous distribution to generate a random value from * @return a random value sampled from the given distribution * @throws MathIllegalArgumentException if the underlynig distribution throws one * @since 2.2 * @deprecated use the distribution's sample() method */ @Deprecated public double nextInversionDeviate(RealDistribution distribution) throws MathIllegalArgumentException { return distribution.inverseCumulativeProbability(nextUniform(0, 1)); }
/** {@inheritDoc} */ public void reseedRandomGenerator(long seed) { random.setSeed(seed); randomData.reSeed(seed); }
/** * Creates a new EmpiricalDistribution with the specified bin count using the * provided {@link RandomDataImpl} instance as the source of random data. * * @param binCount number of bins * @param randomData random data generator (may be null, resulting in default JDK generator) * @since 3.0 * @deprecated As of 3.1. Please use {@link #EmpiricalDistribution(int,RandomGenerator)} instead. */ @Deprecated public EmpiricalDistribution(int binCount, RandomDataImpl randomData) { this(binCount, randomData.getDelegate()); }
/** * Generate a random deviate from the given distribution using the * <a href="http://en.wikipedia.org/wiki/Inverse_transform_sampling"> inversion method.</a> * * @param distribution Integer distribution to generate a random value from * @return a random value sampled from the given distribution * @throws MathIllegalArgumentException if the underlynig distribution throws one * @since 2.2 * @deprecated use the distribution's sample() method */ @Deprecated public int nextInversionDeviate(IntegerDistribution distribution) throws MathIllegalArgumentException { return distribution.inverseCumulativeProbability(nextUniform(0, 1)); }
/** {@inheritDoc} */ public void reseedRandomGenerator(long seed) { random.setSeed(seed); randomData.reSeed(seed); }
/** * Sets the weights in the whole matrix uniformly between -eInit and eInit * (eInit is the standard deviation) with zero mean. */ private void setWeightsUniformly(RandomDataImpl rnd, double eInit) { for (int i = 0; i < weights.getColumnCount(); i++) { for (int j = 0; j < weights.getRowCount(); j++) { weights.set(j, i, rnd.nextUniform(-eInit, eInit)); } } }