Package edu.sc.seis.seisFile.sac
Class Complex
java.lang.Object
edu.sc.seis.seisFile.sac.Complex
- Direct Known Subclasses:
PoleZero
public class Complex
extends java.lang.Object
Simple class to hold complex (real and imaginary) numbers.
-
Field Summary
-
Constructor Summary
Constructors Constructor Description Complex(double real, double imaginary)
-
Method Summary
Modifier and Type Method Description static Complex
add(double a, Complex b)
static Complex
add(Complex a, double b)
static Complex
add(Complex a, Complex b)
Complex
conjg()
static Complex
div(double a, Complex b)
static Complex
div(Complex a, double b)
static Complex
div(Complex a, Complex b)
boolean
equals(java.lang.Object obj)
double
getImaginary()
double
getReal()
int
hashCode()
double
mag()
static Complex
mul(double a, Complex b)
static Complex
mul(Complex a, double b)
static Complex
mul(Complex a, Complex b)
static Complex
sub(double a, Complex b)
static Complex
sub(Complex a, double b)
static Complex
sub(Complex a, Complex b)
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
real
protected double real -
imaginary
protected double imaginary
-
-
Constructor Details
-
Complex
public Complex(double real, double imaginary)
-
-
Method Details
-
getReal
public double getReal() -
getImaginary
public double getImaginary() -
mag
public final double mag() -
conjg
-
add
-
add
-
add
-
sub
-
sub
-
sub
-
mul
-
mul
-
mul
-
div
-
div
-
div
-
equals
public boolean equals(java.lang.Object obj)- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()- Overrides:
hashCode
in classjava.lang.Object
-