Lagrangian Interpolation
|
03-08-2015, 06:02 AM
(This post was last modified: 03-08-2015 07:59 PM by Thomas Klemm.)
Post: #5
|
|||
|
|||
RE: Lagrangian Interpolation
You could use the barycentric interpolation formula:
\[ L(x) = \frac{\sum_{j=0}^k \frac{w_j}{x-x_j}y_j}{\sum_{j=0}^k \frac{w_j}{x-x_j}} \] This avoids the nested loop at the cost of 3 additional registers for the weights \(w_j\). These weights have to be computed only once for the given data-set. With only 3 points you could even unroll the loop which would probably speed up the calculation. Cheers Thomas |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)