Class GridSurfaceInterpolator

  • All Implemented Interfaces:
    SurfaceInterpolator, Serializable, org.joda.beans.Bean, org.joda.beans.ImmutableBean

    public final class GridSurfaceInterpolator
    extends Object
    implements SurfaceInterpolator, org.joda.beans.ImmutableBean, Serializable
    A surface interpolator that is based on two curve interpolators.

    The surface parameters are divided into rows and columns based on the x-values and y-values. There must be at least two y-values for each x-value. In most cases, the parameters will form a rectangular grid.

    The interpolation operates in two stages. First, the parameters are grouped into sets, each with the same x value. Second, the y curve interpolator is used on each set of y values. Finally, the x curve interpolator is used on the results of the y interpolation.

    There should be at least two different y-values for each x-value. If there is only one, then the associated z-value will always be returned.

    See Also:
    Serialized Form
    • Method Detail

      • bind

        public BoundSurfaceInterpolator bind​(DoubleArray xValues,
                                             DoubleArray yValues,
                                             DoubleArray zValues)
        Description copied from interface: SurfaceInterpolator
        Binds this interpolator to a surface.

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

        Specified by:
        bind in interface SurfaceInterpolator
        Parameters:
        xValues - the x-values of the surface, must be sorted from low to high
        yValues - the y-values of the surface, must be sorted from low to high within x
        zValues - the z-values of the surface
        Returns:
        the bound interpolator
      • getXInterpolator

        public CurveInterpolator getXInterpolator()
        Gets the x-value interpolator.
        Returns:
        the value of the property
      • getXExtrapolatorLeft

        public CurveExtrapolator getXExtrapolatorLeft()
        Gets the x-value left extrapolator.
        Returns:
        the value of the property
      • getXExtrapolatorRight

        public CurveExtrapolator getXExtrapolatorRight()
        Gets the x-value right extrapolator.
        Returns:
        the value of the property
      • getYInterpolator

        public CurveInterpolator getYInterpolator()
        Gets the y-value interpolator.
        Returns:
        the value of the property
      • getYExtrapolatorLeft

        public CurveExtrapolator getYExtrapolatorLeft()
        Gets the y-value left extrapolator.
        Returns:
        the value of the property
      • getYExtrapolatorRight

        public CurveExtrapolator getYExtrapolatorRight()
        Gets the y-value right extrapolator.
        Returns:
        the value of the property
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object