Interface DataSet2D

    • Method Detail

      • getDataCount

        int getDataCount()
        Get the number of data points in the data set.
        Specified by:
        getDataCount in interface DataSet
        Returns:
        the number of data points
      • getDataCount

        default int getDataCount​(int dim)
        Get the number of data points in the data set
        Specified by:
        getDataCount in interface DataSet
        Parameters:
        dim - the dimension index (ie. '0' equals 'X', '1' equals 'Y')
        Returns:
        the number of data points
      • 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. The index returned may be less then zero or larger the the number of data points in the data set, if the x coordinate lies outside the range of the data set.
        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.
        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