class ArrayInterpolator1DDataBundle implements Interpolator1DDataBundle, Serializable {

  @Override
  public int getLowerBoundIndex(final Double value) {
    if (value < _keys[0]) {
      throw new IllegalArgumentException("Could not get lower bound index for " + value + ": lowest x-value is "
          + _keys[0]);
    }
    if (value > _keys[_n - 1]) {
      throw new IllegalArgumentException("Could not get lower bound index for " + value + ": highest x-value is "
          + _keys[_keys.length - 1]);
    }
    int index = Arrays.binarySearch(_keys, value);
    if (index >= 0) {
      // Fast break out if it's an exact match.
      return index;
    }
    if (index < 0) {
      index = -(index + 1);
      index--;
    }
    if (value == -0. && index < _n - 1 && _keys[index + 1] == 0.) {
      ++index;
    }
    return index;
  }

  public  ArrayInterpolator1DDataBundle(final double[] keys, final double[] values);
  public  ArrayInterpolator1DDataBundle(final double[] keys, final double[] values, final boolean inputsSorted);

}