LaplaceDistribution implements ProbabilityDistribution<Double> { @Override public double getInverseCDF(final Double p) { Validate.notNull(p); Validate.isTrue(p >= 0 && p <= 1, "Probability must lie between 0 and 1 (inclusive)"); return _mu - _b * Math.signum(p - 0.5) * Math.log(1 - 2 * Math.abs(p - 0.5)); } LaplaceDistribution(final double mu, final double b);  LaplaceDistribution(final double mu, final double b, final RandomEngine engine); @Override double getCDF(final Double x); @Override double getInverseCDF(final Double p); @Override double getPDF(final Double x); @Override double nextRandom(); double getMu(); double getB(); @Override int hashCode(); @Override boolean equals(final Object obj);  }
@Test(expectedExceptions = IllegalArgumentException.class) public void testInverseCDFWithLow() { LAPLACE.getInverseCDF(-0.45); }
@Test(expectedExceptions = IllegalArgumentException.class) public void testInverseCDFWithHigh() { LAPLACE.getInverseCDF(6.7); }