edu.rit.numeric
Class ArraySeries
- java.lang.Object
-
- edu.rit.numeric.Series
-
- edu.rit.numeric.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
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class edu.rit.numeric.Series
Series.RobustStats, Series.Stats
-
-
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 intlength()Returns the number of values in this series.voidreadExternal(java.io.ObjectInput in)Read this series from the given object input stream.voidwriteExternal(java.io.ObjectOutput out)Write this series to the given object output stream.doublex(int i)Returns the given X value in this series.-
Methods inherited from class edu.rit.numeric.Series
isEmpty, iterator, maxX, minX, print, print, print, robustStats, stats
-
-
-
-
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.
-
x
public double x(int i)
Returns the given X value in this series.
-
writeExternal
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOExceptionWrite this 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 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