DoubleRangeLimitTransform implements ParameterLimitsTransform { @Override public double transformGradient(final double x) { Validate.isTrue(x <= _upper && x >= _lower, "parameter out of range"); final double t = (x - _mid) / _scale; return 1 / (_scale * (1 - t * t)); } DoubleRangeLimitTransform(final double lower, final double upper); @Override double inverseTransform(final double y); @Override double transform(final double x); @Override double inverseTransformGradient(final double y); @Override double transformGradient(final double x); @Override int hashCode(); @Override boolean equals(final Object obj);  }
@Test(expectedExceptions = IllegalArgumentException.class) public void testOutOfRange3() { RANGE_LIMITS.transformGradient(-3); }
@Test(expectedExceptions = IllegalArgumentException.class) public void testOutOfRange4() { RANGE_LIMITS.transformGradient(1.01); }