edu.rit.numeric
Class ArrayXYSeries
- java.lang.Object
-
- edu.rit.numeric.XYSeries
-
- edu.rit.numeric.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
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class edu.rit.numeric.XYSeries
XYSeries.Regression
-
-
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 intlength()Returns the number of values in this series.voidreadExternal(java.io.ObjectInput in)Read this X-Y series from the given object input stream.voidwriteExternal(java.io.ObjectOutput out)Write this X-Y series to the given object output stream.doublex(int i)Returns the given X value in this series.SeriesxSeries()Returns a Series view of the X values in this XY series.doubley(int i)Returns the given Y value in this series.SeriesySeries()Returns a Series view of the Y values in this XY series.
-
-
-
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.
-
x
public double x(int i)
Returns the given X value in this series.
-
y
public double y(int i)
Returns the given Y value in this series.
-
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.
-
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.
-
writeExternal
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOExceptionWrite this X-Y series to the given object output stream.- Specified by:
writeExternalin interfacejava.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.IOExceptionRead this X-Y series from the given object input stream.- Specified by:
readExternalin interfacejava.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