@Test public void testConstructor_withNegativeOffsetAndOffsetCompression() { XYSeries rawData = new SimpleXYSeries(SimpleXYSeries.ArrayFormat.Y_VALS_ONLY, "s1", 0, 2, 4, 6, 8, 10); NormedXYSeries normedData = new NormedXYSeries(rawData, new NormedXYSeries.Norm(null, -0.5, true), new NormedXYSeries.Norm(null, -0.5, true)); assertEquals(0d, normedData.getY(0).doubleValue(), DELTA); assertEquals(0.1d, normedData.getY(1).doubleValue(), DELTA); assertEquals(0.2d, normedData.getY(2).doubleValue(), DELTA); assertEquals(0.5d, normedData.getY(5).doubleValue(), DELTA); }
@Override public Number getY(int index) { final Number yVal = rawData.getY(index); if(yVal != null && transformY != null) { return minMaxY.transform(yVal.doubleValue(), transformY); } return yVal; }
NormedXYSeries implements XYSeries { @Override public Number getY(int index) { final Number yVal = rawData.getY(index); if(yVal != null && transformY != null) { return minMaxY.transform(yVal.doubleValue(), transformY); } return yVal; } }
NormedXYSeries implements XYSeries { @Override public Number getY(int index) { final Number yVal = rawData.getY(index); if(yVal != null && transformY != null) { return minMaxY.transform(yVal.doubleValue(), transformY); } return yVal; } NormedXYSeries(XYSeries rawData);  NormedXYSeries(XYSeries rawData, Norm x, Norm y); }
NormedXYSeries implements XYSeries { @Override public Number getY(int index) { final Number yVal = rawData.getY(index); if(yVal != null && transformY != null) { return minMaxY.transform(yVal.doubleValue(), transformY); } return yVal; } NormedXYSeries(XYSeries rawData);  NormedXYSeries(XYSeries rawData, Norm x, Norm y); @Override String getTitle(); @Override int size(); Number denormalizeXVal(Number xVal); Number denormalizeYVal(Number yVal); @Override Number getX(int index); @Override Number getY(int index); }
NormedXYSeries implements XYSeries { @Override public Number getY(int index) { final Number yVal = rawData.getY(index); if(yVal != null && transformY != null) { return minMaxY.transform(yVal.doubleValue(), transformY); } return yVal; } NormedXYSeries(XYSeries rawData);  NormedXYSeries(XYSeries rawData, Norm x, Norm y); @Override String getTitle(); @Override int size(); Number denormalizeXVal(Number xVal); Number denormalizeYVal(Number yVal); @Override Number getX(int index); @Override Number getY(int index);  }