StudentTOneTailedCriticalValueCalculator extends Function1D<Double, Double> { @Override public Double evaluate(final Double x) { ArgumentChecker.notNull(x, "x"); ArgumentChecker.notNegative(x, "x"); if (CompareUtils.closeEquals(x, 0.5, 1e-14)) { return 0.5; } return _dist.getInverseCDF(x); } StudentTOneTailedCriticalValueCalculator(final double nu);  StudentTOneTailedCriticalValueCalculator(final double nu, final RandomEngine engine); @Override Double evaluate(final Double x);  }
@Test(expectedExceptions = IllegalArgumentException.class) public void testNull() { F.evaluate((Double) null); }
@Test(expectedExceptions = IllegalArgumentException.class) public void testNegative() { F.evaluate(-4.); }
@Test public void test() { double x; final double eps = 1e-5; for (int i = 0; i < 100; i++) { x = RANDOM.nextDouble(); assertEquals(x, F.evaluate(T.getCDF(x)), eps); } }