|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sarcommand.fft.Complex
public class Complex
This class represents a complex number. If offers the basic operations required to compute the fast fourier transformation.
Field Summary | |
---|---|
double |
imag
The imaginary part of this complex number. |
double |
real
The real part of this complex number. |
Constructor Summary | |
---|---|
Complex(double re,
double im)
Creates a new complex number from the given real and imaginary part. |
Method Summary | |
---|---|
Complex |
conjugate()
Returns the conjugate of this complex. |
Complex |
divides(Complex b)
Returns the quotient of this / b. |
static Complex[] |
makeComplexArray(int n)
Creates and initializes a complex array of length n. |
Complex |
minus(Complex b)
Returns the difference between this complex and b. |
Complex |
plus(Complex b)
Returns the sum of this complex and b. |
Complex |
reciprocal()
Returns a complex which's value is the reciprocal of this. |
Complex |
times(Complex b)
Returns the product of this and b. |
java.lang.String |
toString()
Returns a string representation of this complex in the form '[real + i * imaginary]'. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public double real
public double imag
Constructor Detail |
---|
public Complex(double re, double im)
re
- This complex's real part.im
- This complex's imaginary part.Method Detail |
---|
public static Complex[] makeComplexArray(int n)
n
- Length of the required array
public Complex plus(Complex b)
b
- Other complex summand.
public Complex minus(Complex b)
b
- Complex subtrahend.
public Complex times(Complex b)
b
- Other complex factor.
public Complex divides(Complex b)
b
- Complex dividend.
public Complex conjugate()
public Complex reciprocal()
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |