Class PiecewisePolynomialInterpolator

    • Constructor Detail

      • PiecewisePolynomialInterpolator

        public PiecewisePolynomialInterpolator()
    • Method Detail

      • interpolate

        public abstract PiecewisePolynomialResult interpolate​(double[] xValues,
                                                              double[] yValues)
        Interpolate.
        Parameters:
        xValues - X values of data
        yValues - Y values of data
        Returns:
        PiecewisePolynomialResult containing knots, coefficients of piecewise polynomials, number of intervals, degree of polynomials, dimension of spline
      • interpolate

        public abstract PiecewisePolynomialResult interpolate​(double[] xValues,
                                                              double[][] yValuesMatrix)
        Interpolate.
        Parameters:
        xValues - X values of data
        yValuesMatrix - Y values of data
        Returns:
        Coefficient matrix whose i-th row vector is {a_n, a_{n-1}, ... } of f(x) = a_n * (x-x_i)^n + a_{n-1} * (x-x_i)^{n-1} +... for the i-th interval
      • interpolate

        public double interpolate​(double[] xValues,
                                  double[] yValues,
                                  double xKey)
        Interpolate.
        Parameters:
        xValues - X values of data
        yValues - Y values of data
        xKey - the key
        Returns:
        value of the underlying cubic spline function at the value of x
      • interpolate

        public DoubleArray interpolate​(double[] xValues,
                                       double[] yValues,
                                       double[] xKeys)
        Interpolate.
        Parameters:
        xValues - X values of data
        yValues - Y values of data
        xKeys - the keys
        Returns:
        Values of the underlying cubic spline function at the values of x
      • interpolate

        public DoubleMatrix interpolate​(double[] xValues,
                                        double[] yValues,
                                        double[][] xMatrix)
        Interpolate.
        Parameters:
        xValues - the values
        yValues - the values
        xMatrix - the matrix
        Returns:
        Values of the underlying cubic spline function at the values of x
      • interpolate

        public DoubleArray interpolate​(double[] xValues,
                                       double[][] yValuesMatrix,
                                       double x)
        Interpolate.
        Parameters:
        xValues - the values
        yValuesMatrix - the matrix
        x - the x
        Returns:
        Values of the underlying cubic spline functions interpolating {yValuesMatrix.RowVectors} at the value of x
      • interpolate

        public DoubleMatrix interpolate​(double[] xValues,
                                        double[][] yValuesMatrix,
                                        double[] x)
        Interpolate.
        Parameters:
        xValues - the values
        yValuesMatrix - the matrix
        x - the s
        Returns:
        Values of the underlying cubic spline functions interpolating {yValuesMatrix.RowVectors} at the values of x
      • interpolate

        public DoubleMatrix[] interpolate​(double[] xValues,
                                          double[][] yValuesMatrix,
                                          double[][] xMatrix)
        Interpolate.
        Parameters:
        xValues - the values
        yValuesMatrix - the matrix
        xMatrix - the matrix
        Returns:
        Values of the underlying cubic spline functions interpolating {yValuesMatrix.RowVectors} at the values of xMatrix
      • getPrimaryMethod

        public PiecewisePolynomialInterpolator getPrimaryMethod()
        Hyman filter modifies derivative values at knot points which are initially computed by a "primary" interpolator.
        Returns:
        The primary interpolator for Hyman filter, interpolation method itself for other interpolators
      • getValue

        protected double getValue​(DoubleArray coefs,
                                  double x,
                                  double leftknot)
        Parameters:
        coefs - {a_n,a_{n-1},...} of f(x) = a_n x^{n} + a_{n-1} x^{n-1} + ....
        x - the x
        leftknot - the knot specifying underlying interpolation function
        Returns:
        the value of the underlying interpolation function at the value of x
      • getValue

        protected double getValue​(double[] coefs,
                                  double x,
                                  double leftknot)
        Parameters:
        coefs - {a_n,a_{n-1},...} of f(x) = a_n x^{n} + a_{n-1} x^{n-1} + ....
        x - the x
        leftknot - the knot specifying underlying interpolation function
        Returns:
        the value of the underlying interpolation function at the value of x