Documentation of 'edu.rit.numeric.ArrayXYSeries' Java class
ArrayXYSeries
edu.rit.numeric

Class ArrayXYSeries

  • All Implemented Interfaces:
    java.io.Externalizable, java.io.Serializable


    public class ArrayXYSeries
    extends XYSeries
    implements java.io.Externalizable
    Class ArrayXYSeries provides an XYSeries view of values stored in arrays. Changing the contents of the arrays will change the ArrayXYSeries.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor and Description
      ArrayXYSeries()
      Construct a new uninitialized array X-Y series.
      ArrayXYSeries(double[] xarray, double[] yarray)
      Construct a new array X-Y series.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      int length()
      Returns the number of values in this series.
      void readExternal(java.io.ObjectInput in)
      Read this X-Y series from the given object input stream.
      void writeExternal(java.io.ObjectOutput out)
      Write this X-Y series to the given object output stream.
      double x(int i)
      Returns the given X value in this series.
      Series xSeries()
      Returns a Series view of the X values in this XY series.
      double y(int i)
      Returns the given Y value in this series.
      Series ySeries()
      Returns a Series view of the Y values in this XY series.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ArrayXYSeries

        public ArrayXYSeries()
        Construct a new uninitialized array X-Y series. This constructor is for use only by object deserialization.
      • ArrayXYSeries

        public ArrayXYSeries(double[] xarray,
                             double[] yarray)
        Construct a new array X-Y series.
        Parameters:
        xarray - Array of X values.
        yarray - Array of Y values.
        Throws:
        java.lang.NullPointerException - (unchecked exception) Thrown if xarray is null or yarray is null.
        java.lang.IllegalArgumentException - (unchecked exception) Thrown if xarray and yarray are not the same length.
    • Method Detail

      • length

        public int length()
        Returns the number of values in this series.
        Specified by:
        length in class XYSeries
        Returns:
        Length.
      • x

        public double x(int i)
        Returns the given X value in this series.
        Specified by:
        x in class XYSeries
        Parameters:
        i - Index.
        Returns:
        The X value in this series at index i.
        Throws:
        java.lang.ArrayIndexOutOfBoundsException - (unchecked exception) Thrown if i is not in the range 0 .. length()-1.
      • y

        public double y(int i)
        Returns the given Y value in this series.
        Specified by:
        y in class XYSeries
        Parameters:
        i - Index.
        Returns:
        The Y value in this series at index i.
        Throws:
        java.lang.ArrayIndexOutOfBoundsException - (unchecked exception) Thrown if i is not in the range 0 .. length()-1.
      • xSeries

        public Series xSeries()
        Returns a Series view of the X values in this XY series.

        Note: The returned Series object is backed by this XY series object. Changing the contents of this XY series object will change the contents of the returned Series object.

        Overrides:
        xSeries in class XYSeries
        Returns:
        Series of X values.
      • ySeries

        public Series ySeries()
        Returns a Series view of the Y values in this XY series.

        Note: The returned Series object is backed by this XY series object. Changing the contents of this XY series object will change the contents of the returned Series object.

        Overrides:
        ySeries in class XYSeries
        Returns:
        Series of Y values.
      • writeExternal

        public void writeExternal(java.io.ObjectOutput out)
                           throws java.io.IOException
        Write this X-Y series to the given object output stream.
        Specified by:
        writeExternal in interface java.io.Externalizable
        Parameters:
        out - Object output stream.
        Throws:
        java.io.IOException - Thrown if an I/O error occurred.
      • readExternal

        public void readExternal(java.io.ObjectInput in)
                          throws java.io.IOException
        Read this X-Y series from the given object input stream.
        Specified by:
        readExternal in interface java.io.Externalizable
        Parameters:
        in - Object input stream.
        Throws:
        java.io.IOException - Thrown if an I/O error occurred.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.