Class InterpolatingPolynomialEstimator

java.lang.Object
com.irurueta.numerical.interpolation.InterpolatingPolynomialEstimator
Direct Known Subclasses:
AccurateInterpolatingPolynomialEstimator, SimpleInterpolatingPolynomialEstimator

public abstract class InterpolatingPolynomialEstimator extends Object
Base class for interpolating polynomial estimators.
  • Constructor Details

    • InterpolatingPolynomialEstimator

      public InterpolatingPolynomialEstimator()
  • Method Details

    • estimate

      public Polynomial estimate(double[] x, double[] y) throws InterpolationException
      Estimates polynomial from provided x and y points.
      Parameters:
      x - x points the estimated polynomial passes through.
      y - y points the estimated polynomial passes through.
      Returns:
      estimated polynomial.
      Throws:
      IllegalArgumentException - if any of the provided values doesn't have the same length.
      InterpolationException - if interpolation fails for numerical reasons.
    • estimateCoefficients

      public double[] estimateCoefficients(double[] x, double[] y) throws InterpolationException
      Estimates polynomial coefficients from provided x and y points.
      Parameters:
      x - x points the estimated polynomial passes through.
      y - y points the estimated polynomial passes through.
      Returns:
      coefficients of estimated polynomial.
      Throws:
      IllegalArgumentException - if any of the provided values doesn't have the same length.
      InterpolationException - if interpolation fails for numerical reasons.
    • estimate

      public void estimate(double[] x, double[] y, Polynomial result) throws InterpolationException
      Estimates polynomial from provided x and y points.
      Parameters:
      x - x points the estimated polynomial passes through.
      y - y points the estimated polynomial passes through.
      result - instance where estimated polynomial will be stored.
      Throws:
      IllegalArgumentException - if any of the provided values doesn't have the same length or polynomial doesn't have expected order.
      InterpolationException - if interpolation fails for numerical reasons.
    • estimate

      public abstract void estimate(double[] x, double[] y, double[] cof) throws InterpolationException
      Estimates polynomial coefficients from provided x and y points.
      Parameters:
      x - x points the estimated polynomial passes through.
      y - y points the estimated polynomial passes through.
      cof - instance where coefficients of estimated polynomial will be stored.
      Throws:
      IllegalArgumentException - if any of the provided values doesn't have the same length.
      InterpolationException - if interpolation fails for numerical reasons.