/** * 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)); }
/** * 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)); }
/** * 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)); }
/** * 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)); }
/** * 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)); }
/** * 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)); }
/** * 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)); } } }