Class BarycentricRationalInterpolator
java.lang.Object
com.irurueta.numerical.interpolation.BaseInterpolator
com.irurueta.numerical.interpolation.BarycentricRationalInterpolator
Computes barycentric rational interpolation.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intOrder of desired approximation.private final double[]Weights for barycentric rational interpolation. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetD()Gets order of desired approximation.doubleinterpolate(double x) Given a value x, returns an interpolated value, using data pointed to byBaseInterpolator.xxandBaseInterpolator.yy.doublerawinterp(int jlo, double x) Actual interpolation method.Methods inherited from class com.irurueta.numerical.interpolation.BaseInterpolator
hunt, locate
-
Field Details
-
w
private final double[] wWeights for barycentric rational interpolation. -
d
private final int dOrder of desired approximation.
-
-
Constructor Details
-
BarycentricRationalInterpolator
public BarycentricRationalInterpolator(double[] x, double[] y, int d) Constructor.- Parameters:
x- x values to interpolate to. Values in x must be monotonic (either increasing or decreasing)y- y values to interpolate to.d- order of desired approximation.
-
-
Method Details
-
getD
public int getD()Gets order of desired approximation.- Returns:
- order of desired approximation.
-
interpolate
public double interpolate(double x) Given a value x, returns an interpolated value, using data pointed to byBaseInterpolator.xxandBaseInterpolator.yy.- Overrides:
interpolatein classBaseInterpolator- Parameters:
x- value to obtain interpolation for.- Returns:
- interpolated value.
-
rawinterp
public double rawinterp(int jlo, double x) Actual interpolation method.- Specified by:
rawinterpin classBaseInterpolator- Parameters:
jlo- index where value x to be interpolated in located in the array of xx.x- value to obtain interpolation for.- Returns:
- interpolated value.
-