Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@www.apache.org Received: (qmail 13629 invoked from network); 3 Apr 2004 02:57:22 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 3 Apr 2004 02:57:22 -0000 Received: (qmail 39771 invoked by uid 500); 3 Apr 2004 02:57:01 -0000 Delivered-To: apmail-jakarta-commons-dev-archive@jakarta.apache.org Received: (qmail 39704 invoked by uid 500); 3 Apr 2004 02:57:00 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 39690 invoked from network); 3 Apr 2004 02:57:00 -0000 Received: from unknown (HELO hume.tsdinc.steitz.com) (209.249.229.10) by daedalus.apache.org with SMTP; 3 Apr 2004 02:57:00 -0000 Received: from Lavoie.tsdinc.steitz.com ([209.249.229.4]) by hume.tsdinc.steitz.com with Microsoft SMTPSVC(5.0.2195.6713); Fri, 2 Apr 2004 21:57:07 -0500 Received: from steitz.com ([130.13.97.180]) by Lavoie.tsdinc.steitz.com with Microsoft SMTPSVC(5.0.2195.6713); Fri, 2 Apr 2004 21:57:07 -0500 Message-ID: <406E2809.4050404@steitz.com> Date: Fri, 02 Apr 2004 19:57:13 -0700 From: Phil Steitz User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Jakarta Commons Developers List Subject: Re: Bug (and fix) on Commons-Math SplineInterpolator References: <20040402234655.14158.qmail@web41306.mail.yahoo.com> In-Reply-To: <20040402234655.14158.qmail@web41306.mail.yahoo.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 03 Apr 2004 02:57:07.0616 (UTC) FILETIME=[59EA4200:01C41927] X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Al Chou wrote: > --- Phil Steitz 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? Good point. I suppose that it would be possible to define polynomial splines that are not smooth in the sense above. Also, higher order polynomial splines may be constrained to agree through more than 2 derivatives. Therefore, I agree that this should be removed from the javadoc. As it says later, the smoothness constraints are not enforced by the class in any case. I will fix this. Good catch. Phil > > > 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 > --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org