SeriesComplex
edu.rit.numeric

Class SeriesComplex



  • public abstract class SeriesComplexextends Object
    Class SeriesComplex is the abstract base class for a series of complex values (type double).
    • Constructor Summary

      Constructors 
      Constructor and Description
      SeriesComplex()
      Construct a new complex series.
    • Method Summary

      Methods 
      Modifier and TypeMethod and Description
      abstract doubleimag(int i)
      Returns the imaginary part of the given complex value in this series.
      SeriesimagSeries()
      Returns a new series consisting of the imaginary parts of the complex values in this series.
      booleanisEmpty()
      Determine if this series is empty.
      abstract intlength()
      Returns the number of values in this series.
      doublemagnitude(int i)
      Returns the magnitude of the given complex value in this series.
      SeriesmagnitudeSeries()
      Returns a new series consisting of the magnitudes of the complex values in this series.
      doublephase(int i)
      Returns the phase of the given complex value in this series.
      SeriesphaseSeries()
      Returns a new series consisting of the phases of the complex values in this series.
      voidprint()
      Print this complex series on the standard output.
      voidprint(PrintStream theStream)
      Print this complex series on the given print stream.
      voidprint(PrintWriter theWriter)
      Print this complex series on the given print writer.
      abstract doublereal(int i)
      Returns the real part of the given complex value in this series.
      SeriesrealSeries()
      Returns a new series consisting of the real parts of the complex values in this series.
      doublesquaredMagnitude(int i)
      Returns the squared magnitude of the given complex value in this series.
      SeriessquaredMagnitudeSeries()
      Returns a new series consisting of the squared magnitudes of the complex values in this series.
    • Constructor Detail

      • SeriesComplex

        public SeriesComplex()
        Construct a new complex series.
    • Method Detail

      • length

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

        public boolean isEmpty()
        Determine if this series is empty.
        Returns:
        True if this series is empty (length = 0), false otherwise.
      • real

        public abstract double real(int i)
        Returns the real part of the given complex value in this series.
        Parameters:
        i - Index.
        Returns:
        The real part of the complex value in this series at index i.
        Throws:
        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 value in this series.
        Parameters:
        i - Index.
        Returns:
        The imaginary part of the complex value in this series at index i.
        Throws:
        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 value in this series. The magnitude is greater than or equal to 0.
        Parameters:
        i - Index.
        Returns:
        The magnitude of the complex value in this series at index i.
        Throws:
        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 value in this series.
        Parameters:
        i - Index.
        Returns:
        The squared magnitude of the complex value in this series at index i.
        Throws:
        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 value in this series. The phase is in the range -pi to +pi.
        Parameters:
        i - Index.
        Returns:
        The phase of the complex value in this series at index i.
        Throws:
        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 values in this series.
        Returns:
        Series of real parts.
      • imagSeries

        public Series imagSeries()
        Returns a new series consisting of the imaginary parts of the complex values in this series.
        Returns:
        Series of imaginary parts.
      • magnitudeSeries

        public Series magnitudeSeries()
        Returns a new series consisting of the magnitudes of the complex values in this 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 values in this series.
        Returns:
        Series of squared magnitudes.
      • phaseSeries

        public Series phaseSeries()
        Returns a new series consisting of the phases of the complex values in this series. Each phase is in the range -pi to +pi.
        Returns:
        Series of phases.
      • print

        public void print()
        Print this complex series on the standard output. Each line of output consists of the index, the value's real part, the value's imaginary part, the value's magnitude, and the value's phase, separated by tabs.
      • print

        public void print(PrintStream theStream)
        Print this complex series on the given print stream. Each line of output consists of the index, the value's real part, the value's imaginary part, the value's magnitude, and the value's phase, separated by tabs.
        Parameters:
        theStream - Print stream.
      • print

        public void print(PrintWriter theWriter)
        Print this complex series on the given print writer. Each line of output consists of the index, the value's real part, the value's imaginary part, the value's magnitude, and the value's phase, separated by tabs.
        Parameters:
        theWriter - Print writer.

SCaVis 1.8 © jWork.org