protected void buildCache() { cache = new int[CACHE_SIZE][4]; if (scaling == Scaling.Absolute) { min = firstKey(); max = lastKey(); } for (int i = 0; i < CACHE_SIZE; i++) { final double v = min + (max - min) * ((double) i / (double) (CACHE_SIZE - 1)); if (interpolate) { interpolateValue(v, cache[i]); } else { absoluteValue(v, cache[i]); } } }