Post Reply 
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
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Lagrangian Interpolation - Namir - 12-18-2013, 06:04 AM
RE: Lagrangian Interpolation - bshoring - 03-05-2015, 05:17 AM
RE: Lagrangian Interpolation - PedroLeiva - 03-05-2015, 09:33 PM
RE: Lagrangian Interpolation - bshoring - 03-07-2015, 11:49 PM
RE: Lagrangian Interpolation - PedroLeiva - 03-09-2015, 03:37 AM
RE: Lagrangian Interpolation - Thomas Klemm - 03-08-2015 06:02 AM
RE: Lagrangian Interpolation - bshoring - 03-09-2015, 03:30 AM
RE: Lagrangian Interpolation - bshoring - 03-09-2015, 09:50 PM
RE: Lagrangian Interpolation - bshoring - 03-13-2015, 05:33 AM
RE: Lagrangian Interpolation - PedroLeiva - 03-14-2019, 03:55 PM
RE: Lagrangian Interpolation - PedroLeiva - 03-14-2019, 07:22 PM
RE: Lagrangian Interpolation - PedroLeiva - 03-14-2019, 08:12 PM



User(s) browsing this thread: 1 Guest(s)