All,
I've been investigating the numerical accuracy issues with the BicubicSplineInterpolator. After re-deriving the equations from the original sources (which were correct in the source and the Apache Math implementation) and implementing a version in Octave that produced similar results it was clear that the original method, while mathematically correct, wasn't producing numbers that would be usable for interpolating a field, even a planar one. I therefore have been implementing a piece-wise cubic spline based model. I have a version coded in Octave that can match planar truth functions to within 10^-15 and quadratic truth functions to within 10^-13. The problem with the implementation in Apache Math has been the values that have been coming out of the spline interpolators. The SplineInterpolator function implements a natural spline algorithm. I've confirmed the outputs of this function against the Math.NET implementation and it is producing comparable numbers. So the implementation of this function in Apache Math seems correct. Unfortunately this algorithm differs from the truth function in tests relatively quickly. I therefore coded up the Akima Spline Interpolator, borrowing the implementation from the Math.NET library (MIT/X11 open source license). This improves the errors considerably but it is still a lot more than what I get within Octave, which uses B-splines. I am therefore going to be attempting porting the B-spline library from here (BSD licensed): http://www.eol.ucar.edu/homes/granger/bspline/doc/ A few questions: 1. Is there an interest in me keeping the AkimaSplineInterpolator in the list of interpolators, assuming that I have a sufficiently rigorous unit test harness around it? 2. Because of the variation in functions I'm thinking that the user should be able to select from a range of interpolators when they generate their bi-cubic interpolation function. What are the thoughts of the default BicubicSplineInterpolator generating coefficients based on B-spline, but giving users the option of generating with AkimaSplineInterpolator, SplineInterpolator (natural spline), or B-spline interpolator? 3. I was thinking of also implementing a BiLinearInterpolator and a BiCubicInterpolator, since those are less costly to analyze and for certain datasets may be better behaved. 4. Should I be generating JIRA issues for each of the interpolator types or do any that correspond to fixing the BicubicSplineInterpolator all fall into the one issue? This is my first contribution to the Apache Commons, so I apologize if the answers to these questions is patently obvious to everyone else. Thanks! Hank Grabowski Chief Technology Officer 10440 Little Patuxent Parkway, Suite 600 Columbia, MD 21044 (410) 715-0005 Office (410) 715-0008 Fax (301) 525-6219 Mobile h...@applieddefense.com www.AppliedDefense.com