2 ms·
Same thing when I was looking for Reinsch Spline code it's a mess. http://stackoverflow.com/questions/5072758/spline-smoothing-algorithm-in-c http://stackoverf
by bigger_cheese 10y ago
Same thing when I was looking for Reinsch Spline code it's a mess.
http://stackoverflow.com/questions/5072758/spline-smoothing-algorithm-in-c http://stackoverflow.com/questions/5072758/spline-smoothing-...
I converted Algol code from a paper into C because I couldn't find any clean C code on the web but it's still ugly eg. here is a chunk of it:
for (i=m1; i < m2; i++) //Choleksy Decomposition {(R^T)R of [(Q^T)(D^2)Q + pT]}
{
r1[i-1] = f*r[i-1];
r2[i-2] = g*r[i-2];
r[i] = 1/(p*b[i]+t[i]-f*r1[i-1]-g*r2[i-2]);
u[i] = a[i]-r1[i-1]*u[i-1]-r2[i-2]*u[i-2];
f = p*c[i]+t1[i]-h*r1[i-1];
g = h;
h = d[i]*p;
}