@Override public PolynomialFunctionNewtonForm interpolate(double x[],double y[]) throws MathIllegalArgumentException {
  PolynomialFunctionLagrangeForm.verifyInterpolationArray(x,y,true);
  final double[] c=new double[x.length - 1];
  System.arraycopy(x,0,c,0,c.length);
  final double[] a=computeDividedDifference(x,y);
  return new PolynomialFunctionNewtonForm(a,c);
}

@ Override public PolynomialFunctionNewtonForm interpolate ( double x [ ] , double y [ ] ) throws MathIllegalArgumentException { PolynomialFunctionLagrangeForm . verifyInterpolationArray ( x , y , true ) ; final double [ ] c = new double [ x . length - 1 ] ; System . arraycopy ( x , 0 , c , 0 , c . length ) ; final double [ ] a = computeDividedDifference ( x , y ) ; return new PolynomialFunctionNewtonForm ( a , c ) ; }
compute an interpolating function for the dataset .
