Class RationalInterpolator
java.lang.Object
com.irurueta.numerical.interpolation.BaseInterpolator
com.irurueta.numerical.interpolation.RationalInterpolator
Computes rational interpolation.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate double
An indication of interpolation error on the y values of the last call toBaseInterpolator.interpolate(double)
.private static final double
A small number. -
Constructor Summary
ConstructorsConstructorDescriptionRationalInterpolator
(double[] x, double[] y) Constructor.RationalInterpolator
(double[] x, double[] y, int m) Constructor. -
Method Summary
Methods inherited from class com.irurueta.numerical.interpolation.BaseInterpolator
hunt, interpolate, locate
-
Field Details
-
TINY
private static final double TINYA small number.- See Also:
-
dy
private double dyAn indication of interpolation error on the y values of the last call toBaseInterpolator.interpolate(double)
.
-
-
Constructor Details
-
RationalInterpolator
public RationalInterpolator(double[] x, double[] y, int m) Constructor.- Parameters:
x
- x values to interpolate to. Values in x must be monotonic (either increasing or decreasing)y
- y values to interpolate to.m
- length of x's and y's to take into account. Must be less or equal than x or y length.- Throws:
IllegalArgumentException
- if x or y have invalid length or m exceeds length of x or y.
-
RationalInterpolator
public RationalInterpolator(double[] x, double[] y) Constructor.- Parameters:
x
- x values to interpolate to. Values in x must be monotonic (either increasing or decreasing)y
- y values to interpolate to.- Throws:
IllegalArgumentException
- if x or y have invalid length or m exceeds length of x or y.
-
-
Method Details
-
getDy
public double getDy()Gets an indication of the error of interpolation on the y values.- Returns:
- indication of error of interpolation.
-
rawinterp
Actual interpolation method.- Specified by:
rawinterp
in classBaseInterpolator
- Parameters:
jl
- index where value x to be interpolated in located in the array of xx.x
- value to obtain interpolation for.- Returns:
- interpolated value.
- Throws:
InterpolationException
- if interpolation fails.
-