commons-issues mailing list archives

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

    [ https://issues.apache.org/jira/browse/MATH-972?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13650888#comment-13650888
] 

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 test.java)

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 PiecewiseLinearFunction.java) 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: https://issues.apache.org/jira/browse/MATH-972
>             Project: Commons Math
>          Issue Type: Bug
>    Affects Versions: 3.2
>         Environment: All
>            Reporter: oskar_hertwig
>            Priority: Trivial
>         Attachments: PiecewiseLinearFunction.java, Test.java
>
>   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: http://www.atlassian.com/software/jira

Mime
View raw message