Interface CurveInterpolator

  • All Superinterfaces:
    Named

    public interface CurveInterpolator
    extends Named
    Interface for interpolators that interpolate between points on a curve.
    • Method Detail

      • of

        static CurveInterpolator of​(java.lang.String uniqueName)
        Obtains an instance from the specified unique name.
        Parameters:
        uniqueName - the unique name
        Returns:
        the index
        Throws:
        java.lang.IllegalArgumentException - if the name is not known
      • extendedEnum

        static ExtendedEnum<CurveInterpolator> extendedEnum()
        Gets the extended enum helper.

        This helper allows instances of the interpolator to be looked up. It also provides the complete set of available instances.

        Returns:
        the extended enum helper
      • bind

        BoundCurveInterpolator bind​(DoubleArray xValues,
                                    DoubleArray yValues)
        Binds this interpolator to a curve where no extrapolation is permitted.

        The bound interpolator provides methods to interpolate the y-value for a x-value. If an attempt is made to interpolate an x-value outside the range defined by the first and last nodes, an exception will be thrown.

        The bind process takes the definition of the interpolator and combines it with the x-y values. This allows implementations to optimize interpolation calculations.

        Parameters:
        xValues - the x-values of the curve, must be sorted from low to high
        yValues - the y-values of the curve
        Returns:
        the bound interpolator
      • bind

        default BoundCurveInterpolator bind​(DoubleArray xValues,
                                            DoubleArray yValues,
                                            CurveExtrapolator extrapolatorLeft,
                                            CurveExtrapolator extrapolatorRight)
        Binds this interpolator to a curve specifying the extrapolators to use.

        The bound interpolator provides methods to interpolate the y-value for a x-value. 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.

        The bind process takes the definition of the interpolator and combines it with the x-y values. This allows implementations to optimize interpolation calculations.

        Parameters:
        xValues - the x-values of the curve, must be sorted from low to high
        yValues - the y-values of the curve
        extrapolatorLeft - the extrapolator for x-values on the left
        extrapolatorRight - the extrapolator for x-values on the right
        Returns:
        the bound interpolator
      • getName

        java.lang.String getName()
        Gets the name that uniquely identifies this interpolator.

        This name is used in serialization and can be parsed using of(String).

        Specified by:
        getName in interface Named
        Returns:
        the unique name