protected void assertInverseGradient(ParameterLimitsTransform transform, double fitParam) { double eps = 1e-5; double g = transform.inverseTransformGradient(fitParam); double fdg; double down = transform.inverseTransform(fitParam - eps); double up = transform.inverseTransform(fitParam + eps); fdg = (up - down) / 2 / eps; assertEquals(g, fdg, 1e-6); }
// reverse protected void assertReverseRoundTrip(ParameterLimitsTransform transform, double fitParam) { double mp = transform.inverseTransform(fitParam); double fp = transform.transform(mp); assertEquals(fitParam, fp, 1e-8); }
protected void assertRoundTrip(ParameterLimitsTransform transform, double modelParam) { double fp = transform.transform(modelParam); double mp = transform.inverseTransform(fp); assertEquals(modelParam, mp, 1e-8); }