NormalizationUtil { static public Number denormalize(NormContinuous normContinuous, Number value){ Value<Double> doubleValue = new DoubleValue(value); doubleValue = denormalize(normContinuous, doubleValue); return doubleValue.getValue(); } private  NormalizationUtil(); static FieldValue normalize(NormContinuous normContinuous, FieldValue value); static Number normalize(NormContinuous normContinuous, Number value); static Value<V> normalize(NormContinuous normContinuous, Value<V> value); static Number denormalize(NormContinuous normContinuous, Number value); static Value<V> denormalize(NormContinuous normContinuous, Value<V> value);  }
@Test public void denormalize(){ NormContinuous normContinuous = createNormContinuous(); assertEquals(BEGIN[0], (double)NormalizationUtil.denormalize(normContinuous, BEGIN[1]), 1e-8); assertEquals(0.3d, (double)NormalizationUtil.denormalize(normContinuous, interpolate(0.3d, BEGIN, MIDPOINT)), 1e-8); assertEquals(MIDPOINT[0], (double)NormalizationUtil.denormalize(normContinuous, MIDPOINT[1]), 1e-8); assertEquals(7.123d, (double)NormalizationUtil.denormalize(normContinuous, interpolate(7.123d, MIDPOINT, END)), 1e-8); assertEquals(END[0], (double)NormalizationUtil.denormalize(normContinuous, END[1]), 1e-8); }