Class BarycentricRationalInterpolator

java.lang.Object
com.irurueta.numerical.interpolation.BaseInterpolator
com.irurueta.numerical.interpolation.BarycentricRationalInterpolator

public class BarycentricRationalInterpolator extends BaseInterpolator
Computes barycentric rational interpolation.
  • Field Details

    • w

      private final double[] w
      Weights for barycentric rational interpolation.
    • d

      private final int d
      Order 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 by BaseInterpolator.xx and BaseInterpolator.yy.
      Overrides:
      interpolate in class BaseInterpolator
      Parameters:
      x - value to obtain interpolation for.
      Returns:
      interpolated value.
    • rawinterp

      public double rawinterp(int jlo, double x)
      Actual interpolation method.
      Specified by:
      rawinterp in class BaseInterpolator
      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.