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

Class ArraySeries

  • All Implemented Interfaces:
    java.io.Externalizable, java.io.Serializable, java.lang.Iterable<java.lang.Double>


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

      Constructors 
      Constructor and Description
      ArraySeries()
      Construct a new uninitialized array series.
      ArraySeries(double[] xarray)
      Construct a new array 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 series from the given object input stream.
      void writeExternal(java.io.ObjectOutput out)
      Write this series to the given object output stream.
      double x(int i)
      Returns the given X value in this series.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.lang.Iterable

        forEach, spliterator
    • Constructor Detail

      • ArraySeries

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

        public ArraySeries(double[] xarray)
        Construct a new array series.
        Parameters:
        xarray - Array of X values.
        Throws:
        java.lang.NullPointerException - (unchecked exception) Thrown if xarray is null.
    • Method Detail

      • length

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

        public double x(int i)
        Returns the given X value in this series.
        Specified by:
        x in class Series
        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.
      • writeExternal

        public void writeExternal(java.io.ObjectOutput out)
                           throws java.io.IOException
        Write this 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 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.