Class PiecewisePolynomialInterpolator2D

  • Direct Known Subclasses:
    BicubicSplineInterpolator

    public abstract class PiecewisePolynomialInterpolator2D
    extends Object
    Abstract class for interpolations based on 2d piecewise polynomial functions .
    • Constructor Detail

      • PiecewisePolynomialInterpolator2D

        public PiecewisePolynomialInterpolator2D()
    • Method Detail

      • interpolate

        public abstract PiecewisePolynomialResult2D interpolate​(double[] x0Values,
                                                                double[] x1Values,
                                                                double[][] yValues)
        Given a set of data points (x0Values_i, x1Values_j, yValues_{ij}), 2d spline interpolation is returned such that f(x0Values_i, x1Values_j) = yValues_{ij}.
        Parameters:
        x0Values - the values
        x1Values - the values
        yValues - the values
        Returns:
        PiecewisePolynomialResult2D containing positions of knots in x0 direction, positions of knots in x1 direction, coefficients of interpolant, number of intervals in x0 direction, number of intervals in x1 direction, order of polynomial function
      • interpolate

        public DoubleMatrix interpolate​(double[] x0Values,
                                        double[] x1Values,
                                        double[][] yValues,
                                        double[] x0Keys,
                                        double[] x1Keys)
        Parameters:
        x0Values - the values
        x1Values - the values
        yValues - the values
        x0Keys - the keys
        x1Keys - the keys
        Returns:
        Values of 2D interpolant at (x0Key_i, x1Keys_j)
      • interpolate

        public double interpolate​(double[] x0Values,
                                  double[] x1Values,
                                  double[][] yValues,
                                  double x0Key,
                                  double x1Key)
        Parameters:
        x0Values - the values
        x1Values - the values
        yValues - the values
        x0Key - the key
        x1Key - the key
        Returns:
        Value of 2D interpolant at (x0Key, x1Key)
      • getValue

        protected double getValue​(DoubleMatrix coefMat,
                                  double x0,
                                  double x1,
                                  double leftKnot0,
                                  double leftKnot1)
        Parameters:
        coefMat - the coefMat
        x0 - the x0
        x1 - the x1
        leftKnot0 - the leftKnot0
        leftKnot1 - the leftKnot1
        Returns:
        sum_{i=0}^{order0-1} sum_{j=0}^{order1-1} coefMat_{ij} (x0-leftKnots0)^{order0-1-i} (x1-leftKnots1)^{order0-1-j}