commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Al Chou <hotfusion...@yahoo.com>
Subject Re: Bug (and fix) on Commons-Math SplineInterpolator
Date Fri, 02 Apr 2004 23:46:55 GMT
--- Phil Steitz <phil@steitz.com> wrote:
> Should be fixed now in CVS.
> 
> In addition to fixing the impl, I made the following changes:
> 
> SplineInterpolator.interpolate(double[], double[]) now returns a 
> PolynomialSplineInterpolator (new class), which has an array of 
> PolynomialFunctions representing the spline segments.
> 
> Both PolynomialSplineInterpolator and PolynomialFunction implement the new 
> DifferentiableUnivariateRealFunction interface. 
> PolynomialSplineInterpolator exposes its polynomials and knot point arrays 
> as read-only properties (getters return copies).
> 
> I added tests to SplineInterpolatorTest (replaces InterpolatorTest) to 
> verify that the correct coefficients are being computed (in the 
> "degenerate" cases, testing against analytical values, for the sin case, 
> using R as a reference) and that the PolynomialSplineFunctions give 
> consistent values at the knot points and the polynomials "match up" (agree 
> throgh 2 derivatives) at the knot points.
> 
> Phil


Whew, that's a lot of work!  Not to discount any of it, but as I started
reading the Javadoc for PolynomialSplineFunction I noticed you explicitly say

    the first two derivatives of "adjacent" polynomials are constrained to
agree at the knot points

Isn't that a property more specifically of a cubic spline, or am I just
ignorant of the definition of splines that use higher (or lower!) order
polynomials?


Al

__________________________________
Do you Yahoo!?
Yahoo! Small Business $15K Web Design Giveaway 
http://promotions.yahoo.com/design_giveaway/

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message