A while ago I implemented a Polynom approximation for a game I programmed.
I am using Newton's pyramide method. It took me quite a while to figure it out, but my solution requires to calculate the binomial coefficients and I also have to sum up all the coefficients for the final coefficient of each power (since solving this problem is similar to squaring, cubing.. terms and calculating the binomial coefficients)
For example:
pick k out of n of the bionomeal terms and add them
one pick is multiplied
a*(x+b)(x+c)(x+d) ==> a*x^3 + a*x^2*(b+c+d) + a*x(bc+bd+cd) +a*b*c*d
so b*c*d would be one pick b*c and b*d too
My question now is: Is there a way calculating the Polynominterpolation with the newton scheme without having to calculate all the bionomial coefficients?
My code: https://github.com/superphil0/Polynominterpolation/blob/master/PolynomInterpolation.java
It works pretty good, although if one gives too many points it will be rather slow because of the selection of terms which have all be summed up
(I am really bad at explaining this in english, I hope someone can understand what I want to know though)
cheers