init();
}
// TODO this logic should be in the interpolator
private void init() {
final Map<DoublesPair, Double> map = new TreeMap<>(new FirstThenSecondDoublesPairComparator());
final double[] x = getXDataAsPrimitive();
final double[] y = getYDataAsPrimitive();
final double[] z = getZDataAsPrimitive();
for (int i = 0; i < size(); i++) {
map.put(DoublesPair.of(x[i], y[i]), z[i]);