commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Phil Steitz (JIRA)" <>
Subject [jira] [Commented] (MATH-562) "UnivariateRealPeriodicInterpolator"
Date Mon, 25 Apr 2011 20:27:03 GMT


Phil Steitz commented on MATH-562:

Sorry for the slow response and lack of understanding.  I still don't quite get the "offset."
 What exactly does this mean? Isn't every point a potential period start point?  Maybe this
is a root?  

What I meant by "fitness" was some kind of reasonability test to ensure that the data conform
to the assumption of periodicity.  Not necessary, but I can imagine scenarios where piecing
together a periodic interpolator from a set of sample points would result in strange and/or
not well-defined behavior.  I could be misunderstanding the setup, but isn't there a risk
that values for points near "cut points" are not well-defined?  What I mean by a "cut point"
is a point near the end of the sample, say between the period sample point and the "extra"
point added after the end.  There will be an interpolated value for that point based on the
"base" interpolator.  The periodic interpolator will return a value for that point based on
translation / extrapolation (assuming I am understanding the setup).  If the underlying function
really is periodic, we have the right period and the base interpolator works perfectly, then
these values will be the same.  If not, they could be different.  How badly different they
can be is what I was referring to as "fitness."

In any case, I think this could be a useful addition and as long as we document exactly what
it does, I am +1 to add.

> "UnivariateRealPeriodicInterpolator"
> ------------------------------------
>                 Key: MATH-562
>                 URL:
>             Project: Commons Math
>          Issue Type: New Feature
>            Reporter: Gilles
>            Assignee: Gilles
>            Priority: Minor
>             Fix For: 3.0
> It would be an interpolator implementation that assumes that the data to be interpolated
is periodic. Thus values that are outside of the range can be passed to the interpolation
> They will be wrapped into the initial range before being passed to the class that actually
computes the interpolation.
> The constructor prototype would be:
> {code}
> /**
>  * Builds an interpolator.
>  *
>  * @param interpolator Interpolator.
>  * @param period Period.
>  * @param offset Offset.
>  * @param extend Number of points to be appended at the beginning and
>  * end of the sample arrays in order to avoid interpolation failure at
>  * the (periodic) boundaries of the orginal interval. The value is the
>  * number of sample points which the original {@code interpolator} needs
>  * on each side of the interpolation point.
>  */
> public UnivariateRealPeriodicInterpolator(UnivariateRealInterpolator interpolator,
>                                           double period,
>                                           double offset,
>                                           int extend) {
>     // ...
> }
> {code}
> Would it be useful to have that in CM?

This message is automatically generated by JIRA.
For more information on JIRA, see:

View raw message