|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.rit.numeric.XYSeries
edu.rit.numeric.ListXYSeries
public class ListXYSeries
Class ListXYSeries provides a series of (x,y) pairs of real values (type double); the series is variable-length.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class edu.rit.numeric.XYSeries |
|---|
XYSeries.Regression |
| Constructor Summary | |
|---|---|
ListXYSeries()
Construct a new zero-length XY series. |
|
| Method Summary | |
|---|---|
ListXYSeries |
add(double... data)
Add the given data to this series. |
ListXYSeries |
add(double[] x,
double[] y)
Add the given data arrays to this series. |
ListXYSeries |
add(double[] x,
double[] y,
int off,
int len)
Add a portion of the given data arrays to this series. |
ListXYSeries |
add(double x,
double y)
Add the given data to this series. |
ListXYSeries |
add(Scanner scanner)
Add data read from the given scanner to this series. |
ListXYSeries |
add(XYSeries theSeries)
Add the given XYSeries to this series. |
ListXYSeries |
add(XYSeries theSeries,
int off,
int len)
Add a portion of the given XYSeries to this series. |
ListXYSeries |
clear()
Clear this series. |
int |
length()
Returns the number of values in this series. |
void |
readExternal(ObjectInput in)
Read this series from the given object input stream. |
void |
writeExternal(ObjectOutput out)
Write this series to the given object output stream. |
double |
x(int i)
Returns the given X value in this series. |
double |
y(int i)
Returns the given Y value in this series. |
| Methods inherited from class edu.rit.numeric.XYSeries |
|---|
isEmpty, linearRegression, maxX, maxY, minX, minY, print, print, print, xSeries, ySeries |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ListXYSeries()
| Method Detail |
|---|
public int length()
length in class XYSeriespublic double x(int i)
x in class XYSeriesi - Index.
ArrayIndexOutOfBoundsException - (unchecked exception) Thrown if i is not in the range
0 .. length()-1.public double y(int i)
y in class XYSeriesi - Index.
ArrayIndexOutOfBoundsException - (unchecked exception) Thrown if i is not in the range
0 .. length()-1.public ListXYSeries clear()
public ListXYSeries add(double x,
double y)
x - X value.y - Y value.
public ListXYSeries add(double... data)
data - Data values.
public ListXYSeries add(double[] x,
double[] y)
x - Array of X values.y - Array of Y values.
NullPointerException - (unchecked exception) Thrown if x or y is null.
public ListXYSeries add(double[] x,
double[] y,
int off,
int len)
x - Array of X values.y - Array of Y values.off - Index of first element to add.len - Number of elements to add.
NullPointerException - (unchecked exception) Thrown if x or y is null.
IndexOutOfBoundsException - (unchecked exception) Thrown if off < 0, len
< 0, off+len > x.length, or off+len
> y.length.public ListXYSeries add(XYSeries theSeries)
theSeries - X-Y series.
NullPointerException - (unchecked exception) Thrown if theSeries is null.
public ListXYSeries add(XYSeries theSeries,
int off,
int len)
theSeries - X-Y series.off - Index of first element to add.len - Number of elements to add.
NullPointerException - (unchecked exception) Thrown if theSeries is null.
IndexOutOfBoundsException - (unchecked exception) Thrown if off < 0, len
< 0, or off+len > theSeries.length().public ListXYSeries add(Scanner scanner)
To read data from a file, pass a scanner constructed on top of the file; to read data from an input stream, pass a scanner constructed on top of the input stream; and so on.
scanner - Scanner.
NullPointerException - (unchecked exception) Thrown if scanner is null.
public void writeExternal(ObjectOutput out)
throws IOException
writeExternal in interface Externalizableout - Object output stream.
IOException - Thrown if an I/O error occurred.
public void readExternal(ObjectInput in)
throws IOException
readExternal in interface Externalizablein - Object input stream.
IOException - Thrown if an I/O error occurred.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||