Class XYZSeries
- java.lang.Object
-
- edu.rit.numeric.XYZSeries
-
- Direct Known Subclasses:
- AggregateXYZSeries, ArrayXYZSeries, ListXYZSeries, TransformedXYZSeries
public abstract class XYZSeries extends java.lang.ObjectClass XYZSeries is the abstract base class for a series of (x,y,z) triples of real values (type double).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static classXYZSeries.RegressionClass XYZSeries.Regression holds the results of a regression on an XYZSeries.
-
Constructor Summary
Constructors Constructor and Description XYZSeries()Construct a new XYZ series.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method and Description booleanisEmpty()Determine if this series is empty.abstract intlength()Returns the number of values in this series.XYZSeries.RegressionlinearRegression()Returns the linear regression of the (x,y) values in this XYZ series.doublemaxX()Returns the maximum X value in this series.doublemaxY()Returns the maximum Y value in this series.doublemaxZ()Returns the maximum Z value in this series.doubleminX()Returns the minimum X value in this series.doubleminY()Returns the minimum Y value in this series.doubleminZ()Returns the minimum Z value in this series.voidprint()Print this XYZ series on the standard output.voidprint(java.io.PrintStream theStream)Print this XYZ series on the given print stream.voidprint(java.io.PrintWriter theWriter)Print this XYZ series on the given print writer.abstract doublex(int i)Returns the given X value in this series.SeriesxSeries()Returns a Series view of the X values in this XYZ series.XYSeriesxySeries()Returns an XYSeries view of the X and Y values in this XYZ series.abstract doubley(int i)Returns the given Y value in this series.SeriesySeries()Returns a Series view of the Y values in this XYZ series.abstract doublez(int i)Returns the given Z value in this series.SerieszSeries()Returns a Series view of the Z values in this XYZ series.
-
-
-
Method Detail
-
length
public abstract int length()
Returns the number of values in this series.- Returns:
- Length.
-
isEmpty
public boolean isEmpty()
Determine if this series is empty.- Returns:
- True if this series is empty (length = 0), false otherwise.
-
x
public abstract double x(int i)
Returns the given X value in this 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.
-
y
public abstract double y(int i)
Returns the given Y value in this series.- 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.
-
z
public abstract double z(int i)
Returns the given Z value in this series.- Parameters:
i- Index.- Returns:
- The Z value in this series at index i.
- Throws:
java.lang.ArrayIndexOutOfBoundsException- (unchecked exception) Thrown if i is not in the range 0 .. length()-1.
-
minX
public double minX()
Returns the minimum X value in this series.- Returns:
- Minimum X value.
-
maxX
public double maxX()
Returns the maximum X value in this series.- Returns:
- Maximum X value.
-
minY
public double minY()
Returns the minimum Y value in this series.- Returns:
- Minimum Y value.
-
maxY
public double maxY()
Returns the maximum Y value in this series.- Returns:
- Maximum Y value.
-
minZ
public double minZ()
Returns the minimum Z value in this series.- Returns:
- Minimum Z value.
-
maxZ
public double maxZ()
Returns the maximum Z value in this series.- Returns:
- Maximum Z value.
-
linearRegression
public XYZSeries.Regression linearRegression()
Returns the linear regression of the (x,y) values in this XYZ series. Each z value is the standard deviation of the measurement error in the corresponding y value, assuming the measurement error distribution is a zero-mean Gaussian. The linear function y = a + bx is fitted to the data. The return value is a Regression object containing the intercept a, the slope b, and various statistics.- Returns:
- Regression.
-
xSeries
public Series xSeries()
Returns a Series view of the X values in this XYZ series.Note: The returned Series object is backed by this XYZ series object. Changing the contents of this XYZ series object will change the contents of the returned Series object.
- Returns:
- Series of X values.
-
ySeries
public Series ySeries()
Returns a Series view of the Y values in this XYZ series.Note: The returned Series object is backed by this XYZ series object. Changing the contents of this XYZ series object will change the contents of the returned Series object.
- Returns:
- Series of Y values.
-
zSeries
public Series zSeries()
Returns a Series view of the Z values in this XYZ series.Note: The returned Series object is backed by this XYZ series object. Changing the contents of this XYZ series object will change the contents of the returned Series object.
- Returns:
- Series of Z values.
-
xySeries
public XYSeries xySeries()
Returns an XYSeries view of the X and Y values in this XYZ series.Note: The returned XYSeries object is backed by this XYZ series object. Changing the contents of this XYZ series object will change the contents of the returned Series object.
- Returns:
- Series of X and Y values.
-
print
public void print()
Print this XYZ series on the standard output. Each line of output consists of the index, the x value, the y value, and the z value, separated by tabs.
-
print
public void print(java.io.PrintStream theStream)
Print this XYZ series on the given print stream. Each line of output consists of the index, the x value, the y value, and the z value, separated by tabs.- Parameters:
theStream- Print stream.
-
print
public void print(java.io.PrintWriter theWriter)
Print this XYZ series on the given print writer. Each line of output consists of the index, the x value, the y value, and the z value, separated by tabs.- Parameters:
theWriter- Print writer.
-
-
DMelt 3.0 © DataMelt by jWork.ORG