com.sun.electric.tool.simulation
Class ComplexWaveform

java.lang.Object
  extended by com.sun.electric.tool.simulation.WaveformImpl
      extended by com.sun.electric.tool.simulation.ComplexWaveform
All Implemented Interfaces:
Waveform

public class ComplexWaveform
extends WaveformImpl

Complex Waveform - piecewise linear complex function of time There are methods which return realwaveforms which are real-part, imag-part, amplitude and phase of this complex waveform. This class also implements Waveform class as real waveform of amplitude.


Constructor Summary
ComplexWaveform(double[] time, double[] realValue, double[] imagValue)
          Constructs complex waveform by time/real/imag tripples.
 
Method Summary
 Waveform getAmplitude()
          Return real waveform which is amplitude of this complex waveform.
 Waveform getImag()
          Return real waveform which is imag part of this complex waveform.
 Waveform getPhase()
          Return real waveform which is phase of this complex waveform.
 Waveform getReal()
          Return real waveform which is real part of this complex waveform.
 
Methods inherited from class com.sun.electric.tool.simulation.WaveformImpl
getEvent, getNumEvents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ComplexWaveform

public ComplexWaveform(double[] time,
                       double[] realValue,
                       double[] imagValue)
Constructs complex waveform by time/real/imag tripples. All three array arguments must have the same length.

Parameters:
time - time array
realValue - array of real parts
imagValue - array of imag parts
Throws:
java.lang.IllegalArgumentException - if arrays don't have the same length
Method Detail

getReal

public Waveform getReal()
Return real waveform which is real part of this complex waveform.

Returns:
real waveform which is real part of this complex waveform.

getImag

public Waveform getImag()
Return real waveform which is imag part of this complex waveform.

Returns:
real waveform which is imag part of this complex waveform.

getAmplitude

public Waveform getAmplitude()
Return real waveform which is amplitude of this complex waveform.

Returns:
real waveform which is amplitude of this complex waveform.

getPhase

public Waveform getPhase()
Return real waveform which is phase of this complex waveform. The phase is in the range of -pi to pi

Returns:
real waveform which is phase of this complex waveform.