Class RationalInterpolator

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

public class RationalInterpolator extends BaseInterpolator
Computes rational interpolation.
  • Field Details

  • 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

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