|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectfftManager.Complex
public class Complex
Class definition for a Complex number type.
| Field Summary | |
|---|---|
double |
imag
|
double |
real
|
static long |
serialVersionUID
|
| Constructor Summary | |
|---|---|
Complex()
|
|
Complex(Complex a)
Constructor |
|
Complex(double real,
double imag)
Constructor |
|
| Method Summary | |
|---|---|
static Complex[] |
allocateComplexArray(int n)
Allocate a new complex array in which each element has been created and it's contents set to 0 +i0; |
static Complex[][] |
allocateComplexArray(int n,
int m)
|
double |
ang()
Gets the angle of a complex number |
void |
assign(Complex b)
Assign new real and imaginary values to an existing Complex number |
void |
assign(double real,
double imag)
Assign new real and imaginary values to an existing Complex number |
Complex |
clone()
|
Complex |
conj()
|
static void |
conj(Complex x)
Converts a number to it's own complex conjugate |
void |
internalTimes(Complex b)
Multiply a complex numbers real and imaginary parts by a complex number |
void |
internalTimes(double b)
Multiply a complex numbers real and imaginary parts by a real number |
boolean |
isInfinite()
Returns true if either the real or imaginary part is infinite, false otherwise |
boolean |
isNaN()
Returns true if either the real or imaginary part is a Not-a-Number (NaN) value, false otherwise |
double |
mag()
Gets the magnitude of a complex number |
double |
magsq()
Gets the squared magnitude of a complex number |
Complex |
minus(Complex b)
Subtract a real number from a complex number |
Complex |
minus(double b)
Subtract a real number from a complex number |
double |
norm()
Deprecated. |
Complex |
plus(Complex b)
Adds a complex number |
Complex |
plus(double b)
Add a real number to a complex number |
Complex |
pow(double f)
Raises a complex number to a scalar power. |
Complex |
sqrt()
Gets the square root of a Complex number |
Complex |
times(Complex b)
Multiply a complex number by another complex number |
Complex |
times(double b)
Multiply a complex number by a real |
static void |
zeroComplexArray(Complex[] array)
Sets all the elements of a complex array to zero |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final long serialVersionUID
public double real
public double imag
| Constructor Detail |
|---|
public Complex()
public Complex(double real,
double imag)
real - real partimag - imaginary partpublic Complex(Complex a)
a - Complex Number (to clone)| Method Detail |
|---|
public Complex clone()
clone in class java.lang.Objectpublic double ang()
public double magsq()
@Deprecated public double norm()
public double mag()
public Complex sqrt()
public Complex pow(double f)
f - power to raise number to
public Complex plus(Complex b)
b - Complex number to add
public void assign(Complex b)
b - Complex number to take values from
public void assign(double real,
double imag)
real - new real partimag - new imaginary partpublic Complex plus(double b)
b - real number
public Complex minus(Complex b)
b - real number
public Complex minus(double b)
b - real number
public Complex times(double b)
b - real number
public Complex times(Complex b)
b - complex number
public void internalTimes(double b)
b - real numberpublic void internalTimes(Complex b)
b - complex numberpublic Complex conj()
public static void conj(Complex x)
x - public boolean isNaN()
public boolean isInfinite()
public static Complex[] allocateComplexArray(int n)
n - length of array
public static Complex[][] allocateComplexArray(int n,
int m)
public static void zeroComplexArray(Complex[] array)
array - Complex Array
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||