/** * Gets a random value in DIGEST_MODE. * <p> * <strong>Preconditions</strong>: <ul> * <li>Before this method is called, <code>computeDistribution()</code> * must have completed successfully; otherwise an * <code>IllegalStateException</code> will be thrown</li></ul></p> * * @return next random value from the empirical distribution digest */ private double getNextDigest() { if ((empiricalDistribution == null) || (empiricalDistribution.getBinStats().size() == 0)) { throw new IllegalStateException("Digest not initialized"); } return empiricalDistribution.getNextValue(); }
/** * Gets a random value in DIGEST_MODE. * <p> * <strong>Preconditions</strong>: <ul> * <li>Before this method is called, <code>computeDistribution()</code> * must have completed successfully; otherwise an * <code>IllegalStateException</code> will be thrown</li></ul></p> * * @return next random value from the empirical distribution digest */ private double getNextDigest() { if ((empiricalDistribution == null) || (empiricalDistribution.getBinStats().size() == 0)) { throw MathRuntimeException.createIllegalStateException(LocalizedFormats.DIGEST_NOT_INITIALIZED); } return empiricalDistribution.getNextValue(); }
/** * Gets a random value in DIGEST_MODE. * <p> * <strong>Preconditions</strong>: <ul> * <li>Before this method is called, <code>computeDistribution()</code> * must have completed successfully; otherwise an * <code>IllegalStateException</code> will be thrown</li></ul></p> * * @return next random value from the empirical distribution digest */ private double getNextDigest() { if ((empiricalDistribution == null) || (empiricalDistribution.getBinStats().size() == 0)) { throw MathRuntimeException.createIllegalStateException("digest not initialized"); } return empiricalDistribution.getNextValue(); }