edu.sc.seis.fissuresUtil.freq
Class Cmplx

java.lang.Object
  extended by edu.sc.seis.fissuresUtil.freq.Cmplx

public class Cmplx
extends java.lang.Object


Field Summary
 double i
           
 double r
           
 
Constructor Summary
Cmplx(double re, double im)
           
 
Method Summary
static Cmplx add(Cmplx a, Cmplx b)
           
static Cmplx add(Cmplx a, double b)
           
static Cmplx add(double a, Cmplx b)
           
 Cmplx conjg()
           
static float[] convolve(float[] fdata, float[] gdata, float delta)
           
static float[] correlate(float[] fdata, float[] gdata)
          Computes the correlation of fdata with gdata.
static Cmplx div(Cmplx a, Cmplx b)
           
static Cmplx div(Cmplx a, double b)
           
static Cmplx div(double a, Cmplx b)
           
static Cmplx exp(Cmplx arg)
           
static Cmplx[] fft(float[] fdata)
          Forward Fast Fourier Transform
static float[] fftInverse(Cmplx[] cdata, int nPoints)
          Inverse Forward Fast Fourier Transform
static double[] four1(double[] data, int isign)
          Fast Fourier Transform (adapted from Numerical Recipies in C) isign = 1 replace data by FFT = -1 replace data by inverse FFT data pseudo-complex array of length nn input as real pairs nn integer power of 2
static float[] four1(float[] data, int isign)
           
static float[] four1Forward(float[] data)
           
static float[] four1Inverse(float[] data)
           
 double imag()
           
 boolean isNaN()
           
 double mag()
           
static Cmplx mul(Cmplx a, Cmplx b)
           
static Cmplx mul(Cmplx a, double b)
           
static Cmplx mul(double a, Cmplx b)
           
 double phs()
           
 double real()
           
 Cmplx sqrt()
           
static Cmplx sub(Cmplx a, Cmplx b)
           
static Cmplx sub(Cmplx a, double b)
           
static Cmplx sub(double a, Cmplx b)
           
 java.lang.String toString()
           
 Cmplx unitVector()
          creates a unit mag complex number.
 Cmplx zeroOrUnitVector()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

r

public double r

i

public double i
Constructor Detail

Cmplx

public Cmplx(double re,
             double im)
Method Detail

add

public static final Cmplx add(double a,
                              Cmplx b)

add

public static final Cmplx add(Cmplx a,
                              double b)

add

public static final Cmplx add(Cmplx a,
                              Cmplx b)

sub

public static final Cmplx sub(double a,
                              Cmplx b)

sub

public static final Cmplx sub(Cmplx a,
                              double b)

sub

public static final Cmplx sub(Cmplx a,
                              Cmplx b)

mul

public static final Cmplx mul(double a,
                              Cmplx b)

mul

public static final Cmplx mul(Cmplx a,
                              double b)

mul

public static final Cmplx mul(Cmplx a,
                              Cmplx b)

div

public static final Cmplx div(double a,
                              Cmplx b)

div

public static final Cmplx div(Cmplx a,
                              double b)

div

public static final Cmplx div(Cmplx a,
                              Cmplx b)

real

public final double real()

imag

public final double imag()

mag

public final double mag()

unitVector

public final Cmplx unitVector()
creates a unit mag complex number. zero is assigned (1,0)


zeroOrUnitVector

public final Cmplx zeroOrUnitVector()

phs

public final double phs()

conjg

public final Cmplx conjg()

exp

public static final Cmplx exp(Cmplx arg)

sqrt

public final Cmplx sqrt()

isNaN

public boolean isNaN()

fft

public static final Cmplx[] fft(float[] fdata)
Forward Fast Fourier Transform


fftInverse

public static final float[] fftInverse(Cmplx[] cdata,
                                       int nPoints)
Inverse Forward Fast Fourier Transform


convolve

public static final float[] convolve(float[] fdata,
                                     float[] gdata,
                                     float delta)

correlate

public static final float[] correlate(float[] fdata,
                                      float[] gdata)
Computes the correlation of fdata with gdata. The value of the output at index i is the sum over j of fdata[i+j]*gdata[j], although using the FFT is much faster than direct sum.

See Also:
section 13-2

four1Forward

public static float[] four1Forward(float[] data)

four1Inverse

public static float[] four1Inverse(float[] data)

four1

public static float[] four1(float[] data,
                            int isign)

four1

public static final double[] four1(double[] data,
                                   int isign)
Fast Fourier Transform (adapted from Numerical Recipies in C) isign = 1 replace data by FFT = -1 replace data by inverse FFT data pseudo-complex array of length nn input as real pairs nn integer power of 2


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object