[
https://issues.apache.org/jira/browse/MATH-1635?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17451462#comment-17451462
]
Gilles Sadowski commented on MATH-1635:
---------------------------------------
I've added a unit test in commit c6094cf9e0f99f71e92e678fef08202fe3301069 (set
to "@Ignore").
It would be useful to know whether another implementation exhibits the same
behaviour.
> AkimaSplineInterpolator overshoots graph
> ----------------------------------------
>
> Key: MATH-1635
> URL: https://issues.apache.org/jira/browse/MATH-1635
> Project: Commons Math
> Issue Type: Bug
> Affects Versions: 3.6.1
> Reporter: Gili
> Priority: Major
>
> AkimaSplineInterpolator is not supposed to overshoot points on the graph, but
> the following testcase seems to show it doing exactly that:
>
> {code:java}
> double[] x = {1616326459, 1616326545, 1616326555, 1616326588, 1616326663,
> 1616326760,
> 1616326770, 1616326792, 1616326856, 1616326964, 1616327028, 1616327233,
> 1616327426,
> 1616327469, 1616327619, 1616327910, 1616328038, 1616328178, 1616328414,
> 1616328747,
> 1616328983, 1616329316, 1616329864, 1616329875};
> double[] y = {2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0,
> 2.0, 2.0, 2.0, 2.0, 2.0, 2.0,
> 2.0, 2.0, 2.0, 2.0, 2.0, 3.0};
> AkimaSplineInterpolator interpolator = new AkimaSplineInterpolator();
> PolynomialSplineFunction interpolate = interpolator.interpolate(x, y);
> double value = interpolate.value(1616329584);
> System.out.println("Interpolated value is: " + value + ". Expected: 2.0");
> {code}
>
> When I run the testcase I get
> {code:java}
> Interpolated value is: -3.9681889999323374. Expected: 2.0 {code}
>
> I am also quite confused about where to find the latest version of this
> library. I know that 3.6.1 is very out of date but I am reluctant to depend
> on SNAPSHOT dependencies, especially if they sit outside of Maven Central.
> What do you recommend?
>
--
This message was sent by Atlassian Jira
(v8.20.1#820001)