Interface BoundCurveInterpolator

  • All Known Implementing Classes:
    AbstractBoundCurveInterpolator

    public interface BoundCurveInterpolator
    A curve interpolator that has been bound to a specific curve.

    A bound interpolator is created from a CurveInterpolator. The bind process takes the definition of the interpolator and combines it with the x-y values. This allows implementations to optimize interpolation calculations.

    A bound interpolator is typically linked to two extrapolators. If an attempt is made to interpolate an x-value outside the range defined by the first and last nodes, the appropriate extrapolator will be used.

    • Method Detail

      • interpolate

        double interpolate​(double x)
        Computes the y-value for the specified x-value by interpolation.
        Parameters:
        x - the x-value to find the y-value for
        Returns:
        the value at the x-value
        Throws:
        RuntimeException - if the y-value cannot be calculated
      • firstDerivative

        double firstDerivative​(double x)
        Computes the first derivative of the y-value for the specified x-value.

        The first derivative is dy/dx.

        Parameters:
        x - the x-value at which the derivative is taken
        Returns:
        the first derivative
        Throws:
        RuntimeException - if the derivative cannot be calculated
      • parameterSensitivity

        DoubleArray parameterSensitivity​(double x)
        Computes the sensitivity of the y-value with respect to the curve parameters.

        This returns an array with one element for each parameter of the curve. The array contains the sensitivity of the y-value at the specified x-value to each parameter.

        Parameters:
        x - the x-value at which the parameter sensitivity is computed
        Returns:
        the sensitivity
        Throws:
        RuntimeException - if the sensitivity cannot be calculated