GeneralizedExtremeValueDistribution implements ProbabilityDistribution<Double> { @Override public double getCDF(final Double x) { Validate.notNull(x); return Math.exp(-getT(x)); } GeneralizedExtremeValueDistribution(final double mu, final double sigma, final double ksi); @Override double getCDF(final Double x); @Override double getInverseCDF(final Double p); @Override double getPDF(final Double x); @Override double nextRandom(); double getMu(); double getSigma(); double getKsi(); @Override int hashCode(); @Override boolean equals(final Object obj);  }
@Test public void testSupport() { ProbabilityDistribution<Double> dist = new GeneralizedExtremeValueDistribution(MU, SIGMA, KSI); double limit = MU - SIGMA / KSI; assertLimit(dist, limit - EPS); assertEquals(dist.getCDF(limit + EPS), 0, EPS); assertEquals(dist.getCDF(LARGE_X), 1, EPS); dist = new GeneralizedExtremeValueDistribution(MU, SIGMA, -KSI); limit = MU + SIGMA / KSI; assertLimit(dist, limit + EPS); assertEquals(dist.getCDF(-LARGE_X), 0, EPS); assertEquals(dist.getCDF(limit - EPS), 1, EPS); dist = new GeneralizedExtremeValueDistribution(MU, SIGMA, 0); assertEquals(dist.getCDF(-LARGE_X), 0, EPS); assertEquals(dist.getCDF(LARGE_X), 1, EPS); }