edu.rit.numeric
Class XYSeriesComplex
- java.lang.Object
-
- edu.rit.numeric.XYSeriesComplex
-
public abstract class XYSeriesComplex extends java.lang.ObjectClass XYSeriesComplex is the abstract base class for a series of (x,y) pairs of values where the x values are real (type double) and the y values are complex (type double).
-
-
Constructor Summary
Constructors Constructor and Description XYSeriesComplex()Construct a new complex XY series.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method and Description abstract doubleimag(int i)Returns the imaginary part of the given complex y value in this complex XY series.SeriesimagSeries()Returns a new series consisting of the imaginary parts of the complex y values in this complex XY series.XYSeriesimagXYSeries()Returns a new XY series consisting of the x values and the imaginary parts of the complex y values in this complex XY series.booleanisEmpty()Determine if this complex XY series is empty.abstract intlength()Returns the number of values in this complex XY series.doublemagnitude(int i)Returns the magnitude of the given complex y value in this complex XY series.SeriesmagnitudeSeries()Returns a new series consisting of the magnitudes of the complex y values in this complex XY series.XYSeriesmagnitudeXYSeries()Returns a new XY series consisting of the x values and the magnitudes of the complex y values in this complex XY series.doublephase(int i)Returns the phase of the given complex y value in this complex XY series.SeriesphaseSeries()Returns a new series consisting of the phases of the complex y values in this complex XY series.XYSeriesphaseXYSeries()Returns a new XY series consisting of the x values and the phases of the complex y values in this complex XY series.voidprint()Print this complex XY series on the standard output.voidprint(java.io.PrintStream theStream)Print this complex XY series on the given print stream.voidprint(java.io.PrintWriter theWriter)Print this complex XY series on the given print writer.abstract doublereal(int i)Returns the real part of the given complex y value in this complex XY series.SeriesrealSeries()Returns a new series consisting of the real parts of the complex y values in this complex XY series.XYSeriesrealXYSeries()Returns a new XY series consisting of the x values and the real parts of the complex y values in this complex XY series.doublesquaredMagnitude(int i)Returns the squared magnitude of the given complex y value in this complex XY series.SeriessquaredMagnitudeSeries()Returns a new series consisting of the squared magnitudes of the complex y values in this complex XY series.XYSeriessquaredMagnitudeXYSeries()Returns a new XY series consisting of the x values and the squared magnitudes of the complex y values in this complex XY series.abstract doublex(int i)Returns the given x value in this complex XY series.
-
-
-
Method Detail
-
length
public abstract int length()
Returns the number of values in this complex XY series.
-
isEmpty
public boolean isEmpty()
Determine if this complex XY 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 complex XY 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.
-
real
public abstract double real(int i)
Returns the real part of the given complex y value in this complex XY series.- Parameters:
i- Index.- Returns:
- The real part of the complex 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.
-
imag
public abstract double imag(int i)
Returns the imaginary part of the given complex y value in this complex XY series.- Parameters:
i- Index.- Returns:
- The imaginary part of the complex 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.
-
magnitude
public double magnitude(int i)
Returns the magnitude of the given complex y value in this complex XY series. The magnitude is greater than or equal to 0.- Parameters:
i- Index.- Returns:
- The magnitude of the complex 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.
-
squaredMagnitude
public double squaredMagnitude(int i)
Returns the squared magnitude of the given complex y value in this complex XY series.- Parameters:
i- Index.- Returns:
- The squared magnitude of the complex 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.
-
phase
public double phase(int i)
Returns the phase of the given complex y value in this complex XY series. The phase is in the range -pi to +pi.- Parameters:
i- Index.- Returns:
- The phase of the complex 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.
-
realSeries
public Series realSeries()
Returns a new series consisting of the real parts of the complex y values in this complex XY series.- Returns:
- Series of real parts.
-
imagSeries
public Series imagSeries()
Returns a new series consisting of the imaginary parts of the complex y values in this complex XY series.- Returns:
- Series of imaginary parts.
-
magnitudeSeries
public Series magnitudeSeries()
Returns a new series consisting of the magnitudes of the complex y values in this complex XY series. Each magnitude is greater than or equal to 0.- Returns:
- Series of magnitudes.
-
squaredMagnitudeSeries
public Series squaredMagnitudeSeries()
Returns a new series consisting of the squared magnitudes of the complex y values in this complex XY series.- Returns:
- Series of squared magnitudes.
-
phaseSeries
public Series phaseSeries()
Returns a new series consisting of the phases of the complex y values in this complex XY series. Each phase is in the range -pi to +pi.- Returns:
- Series of phases.
-
realXYSeries
public XYSeries realXYSeries()
Returns a new XY series consisting of the x values and the real parts of the complex y values in this complex XY series.- Returns:
- XY series of real parts.
-
imagXYSeries
public XYSeries imagXYSeries()
Returns a new XY series consisting of the x values and the imaginary parts of the complex y values in this complex XY series.- Returns:
- XY series of imaginary parts.
-
magnitudeXYSeries
public XYSeries magnitudeXYSeries()
Returns a new XY series consisting of the x values and the magnitudes of the complex y values in this complex XY series. Each magnitude is greater than or equal to 0.- Returns:
- XY series of magnitudes.
-
squaredMagnitudeXYSeries
public XYSeries squaredMagnitudeXYSeries()
Returns a new XY series consisting of the x values and the squared magnitudes of the complex y values in this complex XY series.- Returns:
- XY series of squared magnitudes.
-
phaseXYSeries
public XYSeries phaseXYSeries()
Returns a new XY series consisting of the x values and the phases of the complex y values in this complex XY series. Each phase is in the range -pi to +pi.- Returns:
- XY series of phases.
-
print
public void print()
Print this complex XY series on the standard output. Each line of output consists of the index, the x value, the y value's real part, the y value's imaginary part, the y value's magnitude, and the y value's phase, separated by tabs.
-
print
public void print(java.io.PrintStream theStream)
Print this complex XY series on the given print stream. Each line of output consists of the index, the x value, the y value's real part, the y value's imaginary part, the y value's magnitude, and the y value's phase, separated by tabs.- Parameters:
theStream- Print stream.
-
print
public void print(java.io.PrintWriter theWriter)
Print this complex XY series on the given print writer. Each line of output consists of the index, the x value, the y value's real part, the y value's imaginary part, the y value's magnitude, and the y value's phase, separated by tabs.- Parameters:
theWriter- Print writer.
-
-
DMelt 3.0 © DataMelt by jWork.ORG