commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "oskar_hertwig (JIRA)" <>
Subject [jira] [Commented] (MATH-972) LinearInterpolator Misconception
Date Tue, 07 May 2013 14:41:16 GMT


oskar_hertwig commented on MATH-972:

Hi Gilles,

First of all tanks for your quick response.

I went a little bit too fast in my bug report and it appears I screw up and your code is ok.
(The code is in

Nevertheless I am stilling interrogating myself about the object returned by Linear Interpolator.
Indeed, the function returned by a linear interpolator should not be derivable on the entire
domain (on each knots points) although a Polynomial Spline Function is always derivable inside
the definition domain.

Consequently your solution allows using the Derivative Method with no restriction although
exceptions should be raised in some points. (After test your code returns the derivative number
at right)

So I am asking to you if it wouldn’t be better that linear Interpolator returns PiecewiseLinearFunction
(I add the code is in which implements UnivariateFunction but
not DifferentiableUnivariateFunction. In another hand I am aware that my solution doesn’t
allow the use of DifferentiableUnivariateSolver.

If you find my suggestion is too purist. I have no problem for closing the ticket.

Kinds regard.

> LinearInterpolator Misconception
> --------------------------------
>                 Key: MATH-972
>                 URL:
>             Project: Commons Math
>          Issue Type: Bug
>    Affects Versions: 3.2
>         Environment: All
>            Reporter: oskar_hertwig
>            Priority: Trivial
>         Attachments:,
>   Original Estimate: 2h
>  Remaining Estimate: 2h
> The method interpolate() of the class LinearInterpolator return a polynomialSplineFunction
althought a piecewiseContinuousFunction have to be returned.
> This cause a bug. Indeed when the interpolated serie is localy constant the linear interpolation
should lead to constant value between this points. This is not possible when the returned
object is a PolynomialSplineFunction

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message