Interface DataSet2D

    • Method Detail

      • getDimension

        default int getDimension()
        Specified by:
        getDimension in interface DataSet
        Returns:
        number of dimensions
      • getValue

        default double getValue​(double x)
        Gets the interpolated y value of the data point for given x coordinate
        Parameters:
        x - the new x coordinate
        Returns:
        the y value
      • getValue

        default double getValue​(int dimIndex,
                                double x)
        Gets the interpolated y value of the data point for given x coordinate
        Specified by:
        getValue in interface DataSet
        Parameters:
        dimIndex - the dimension index (ie. '0' equals 'X', '1' equals 'Y')
        x - the new x coordinate
        Returns:
        the y value
      • getX

        default double getX​(int index)
        Gets the x value of the data point with the index i
        Parameters:
        index - the data point index
        Returns:
        the x value
      • getXIndex

        default int getXIndex​(double x)
        Gets the index of the data point closest to the given x coordinate. If the x coordinate lies outside the range of the data set, the index of the first/last point is returned.
        Parameters:
        x - the x position of the data point
        Returns:
        the index of the data point
      • getXValues

        default double[] getXValues()
        Returns:
        the x value array
      • getY

        default double getY​(int index)
        Gets the y value of the data point with the index i
        Parameters:
        index - the data point index
        Returns:
        the y value
      • getYIndex

        default int getYIndex​(double y)
        Gets the first index of the data point closest to the given y coordinate. If the y coordinate lies outside the range of the data set, the index of the first/last point is returned.
        Parameters:
        y - the y position of the data point
        Returns:
        the index of the data point
      • getYValues

        default double[] getYValues()
        Returns:
        the x value array