Class Polynomial2DInterpolator

java.lang.Object
com.irurueta.numerical.interpolation.Polynomial2DInterpolator

public class Polynomial2DInterpolator extends Object
Interpolation in two dimensions. This implementation uses a higher order than BilinearInterpolator for accuracy reasons.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final int
    Length of x1v array.
    private final int
    Number of rows of sub-block of ym values to be processed.
    private final int
    Length of x2v array.
    private final int
    Number of columns of sub-block of ym values to be processed.
    One dimensional interpolator for x1v.
    One dimensional interpolator for x2v.
    private final com.irurueta.algebra.Matrix
    Matrix of tabulated function values yij.
    private final double[]
    Temporary array containing interpolated values in one direction.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Polynomial2DInterpolator(double[] x1v, double[] x2v, com.irurueta.algebra.Matrix ym)
    Constructor.
    Polynomial2DInterpolator(double[] x1v, double[] x2v, com.irurueta.algebra.Matrix ym, int mp, int np)
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Gets length of x1v array.
    int
    Gets number of rows of sub-block of ym values to be processed.
    int
    Gets length of x2v array.
    int
    Gets number of columns of sub-block of ym values to be processed.
    double
    interpolate(double x1p, double x2p)
    Given values x1p an x2p, returns an interpolated value.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • m

      private final int m
      Length of x1v array.
    • n

      private final int n
      Length of x2v array.
    • mm

      private final int mm
      Number of rows of sub-block of ym values to be processed.
    • nn

      private final int nn
      Number of columns of sub-block of ym values to be processed.
    • y

      private final com.irurueta.algebra.Matrix y
      Matrix of tabulated function values yij.
    • yv

      private final double[] yv
      Temporary array containing interpolated values in one direction.
    • x1terp

      private final PolynomialInterpolator x1terp
      One dimensional interpolator for x1v.
    • x2terp

      private final PolynomialInterpolator x2terp
      One dimensional interpolator for x2v.
  • Constructor Details

    • Polynomial2DInterpolator

      public Polynomial2DInterpolator(double[] x1v, double[] x2v, com.irurueta.algebra.Matrix ym, int mp, int np)
      Constructor.
      Parameters:
      x1v - array of x1v.
      x2v - array of x2v.
      ym - matrix of tabulated function values yij.
      mp - defines number of rows of sub-block of ym values to be processed.
      np - defined number of columns of sub-block of ym values to be processed.
    • Polynomial2DInterpolator

      public Polynomial2DInterpolator(double[] x1v, double[] x2v, com.irurueta.algebra.Matrix ym)
      Constructor.
      Parameters:
      x1v - array of x1v.
      x2v - array of x2v.
      ym - matrix of tabulated function values yij.
  • Method Details

    • getM

      public int getM()
      Gets length of x1v array.
      Returns:
      length of x1v array.
    • getN

      public int getN()
      Gets length of x2v array.
      Returns:
      length of x2v array.
    • getMm

      public int getMm()
      Gets number of rows of sub-block of ym values to be processed.
      Returns:
      number of rows of sub-block of ym values to be processed.
    • getNn

      public int getNn()
      Gets number of columns of sub-block of ym values to be processed.
      Returns:
      number of columns of sub-block of ym values to be processed.
    • interpolate

      public double interpolate(double x1p, double x2p) throws InterpolationException
      Given values x1p an x2p, returns an interpolated value.
      Parameters:
      x1p - x1p value where interpolation is estimated.
      x2p - x2p value where interpolation is estimated.
      Returns:
      interpolated value.
      Throws:
      InterpolationException - if interpolation fails.