public class UnivariatePeriodicInterpolator extends Object implements UnivariateInterpolator
UnivariateInterpolator
interface.
The data to be interpolated is assumed to be periodic. Thus values that are
outside of the range can be passed to the interpolation function: They will
be wrapped into the initial range before being passed to the class that
actually computes the interpolation.Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_EXTEND
Default number of extension points of the samples array.
|
Constructor and Description |
---|
UnivariatePeriodicInterpolator(UnivariateInterpolator interpolatorIn,
double periodIn)
Builds an interpolator.
|
UnivariatePeriodicInterpolator(UnivariateInterpolator interpolatorIn,
double periodIn,
int extendIn)
Builds an interpolator.
|
Modifier and Type | Method and Description |
---|---|
UnivariateFunction |
interpolate(double[] xval,
double[] yval)
Compute an interpolating function for the dataset.
|
public static final int DEFAULT_EXTEND
public UnivariatePeriodicInterpolator(UnivariateInterpolator interpolatorIn, double periodIn, int extendIn)
interpolatorIn
- Interpolator.periodIn
- Period.extendIn
- 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 interpolator
needs
on each side of the interpolated point.public UnivariatePeriodicInterpolator(UnivariateInterpolator interpolatorIn, double periodIn)
DEFAULT_EXTEND
as the number of extension points on each side
of the original abscissae range.interpolatorIn
- Interpolator.periodIn
- Period.public UnivariateFunction interpolate(double[] xval, double[] yval)
interpolate
in interface UnivariateInterpolator
xval
- Arguments for the interpolation points.yval
- Values for the interpolation points.NumberIsTooSmallException
- if the number of extension points
iss larger then the size of xval
.Copyright © 2017 CNES. All rights reserved.