edu.rit.numeric
Class AggregateXYSeries

java.lang.Object
  extended by edu.rit.numeric.XYSeries
      extended by edu.rit.numeric.AggregateXYSeries

public class AggregateXYSeries
extends XYSeries

Class AggregateXYSeries provides an XYSeries formed by aggregating two Series together.


Nested Class Summary
 
Nested classes/interfaces inherited from class edu.rit.numeric.XYSeries
XYSeries.Regression
 
Constructor Summary
AggregateXYSeries(Series x, Series y)
          Construct a new aggregate XY series.
 
Method Summary
 int length()
          Returns the number of values in this series.
 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

AggregateXYSeries

public AggregateXYSeries(Series x,
                         Series y)
Construct a new aggregate XY series. It is assumed that the x and y series are the same length.

Note: This series object stores references to x and y. Changing the contents of x or y will change the contents of this series.

Parameters:
x - Series of X values.
y - Series of Y values.
Throws:
NullPointerException - (unchecked exception) Thrown if x or y is null.
Method Detail

length

public int length()
Returns the number of values in this series.

Specified by:
length in class XYSeries
Returns:
Length.

x

public double x(int i)
Returns the given X value in this series.

Specified by:
x in class XYSeries
Parameters:
i - Index.
Returns:
The X value in this series at index i.
Throws:
ArrayIndexOutOfBoundsException - (unchecked exception) Thrown if i is not in the range 0 .. length()-1.

y

public double y(int i)
Returns the given Y value in this series.

Specified by:
y in class XYSeries
Parameters:
i - Index.
Returns:
The Y value in this series at index i.
Throws:
ArrayIndexOutOfBoundsException - (unchecked exception) Thrown if i is not in the range 0 .. length()-1.


Copyright © 2005-2012 by Alan Kaminsky. All rights reserved. Send comments to ark­@­cs.rit.edu.