Class XYDataset

  • All Implemented Interfaces:
    Serializable

    public class XYDataset
    extends Dataset
    Container for XY data.
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected gnu.trove.list.TDoubleList m_X
      the x data.
      protected gnu.trove.list.TDoubleList m_Y
      the y data.
      • Fields inherited from class adams.gui.visualization.xchart.dataset.Dataset

        m_Name
    • Constructor Summary

      Constructors 
      Constructor Description
      XYDataset​(String name)
      Initializes the container with no data.
      XYDataset​(String name, double[] x, double[] y)
      Initializes the container with the specified x/y values.
    • Field Detail

      • m_X

        protected gnu.trove.list.TDoubleList m_X
        the x data.
      • m_Y

        protected gnu.trove.list.TDoubleList m_Y
        the y data.
    • Constructor Detail

      • XYDataset

        public XYDataset​(String name)
        Initializes the container with no data.
        Parameters:
        name - the name of the dataset
      • XYDataset

        public XYDataset​(String name,
                         double[] x,
                         double[] y)
        Initializes the container with the specified x/y values.
        Parameters:
        name - the name of the dataset
        x - the x data
        y - the y data
    • Method Detail

      • add

        public void add​(double x,
                        double y)
        Adds the data point to the dataset.
        Parameters:
        x - the X to add
        y - the Y to add
      • getX

        public double[] getX()
        Returns the X data.
        Returns:
        the data
      • getY

        public double[] getY()
        Returns the Y data.
        Returns:
        the data