|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.lang.Number | +--jm.jigl.Complex
Complex Number Operation
jigl.math.Complex
,
Serialized FormField Summary | |
protected float |
x
the real part of the Complex number |
protected float |
y
imaginary part of the Complex number |
Constructor Summary | |
Complex()
Sets the real and imaginary part of the complex number to zero |
|
Complex(Complex z)
Initilizes the complex number to z |
|
Complex(double a,
double b)
Initilizes the real and imaginary part to a and b repectively |
Method Summary | |
Complex |
add(Complex z)
Adds this complex number to another complex number |
static Complex |
add(Complex z1,
Complex z2)
Adds two complex numbers |
Complex |
add(double a)
Adds a constant to the real part of this complex number |
double |
arg()
Performs the function on the complex number |
Complex |
conj()
Performs the conjuction function on the complex number |
Complex |
cos()
Returns the cosine of this complex number |
Complex |
cosh()
Returns the hyperbolic cosine of this complex number |
Complex |
div(Complex z)
Divides this complex number by another complex number |
static Complex |
div(Complex z1,
Complex z2)
Divides two complex numbers |
Complex |
div(double a)
Divides this complex number by a constant |
double |
doubleValue()
Returns the double value of this complex number |
boolean |
equals(Complex z)
Compares this complex number to another Complex number |
Complex |
exp()
Returns the exponential function of this complex number |
float |
floatValue()
Returns the float value of this complex number |
double |
imag()
Return the imaginary part of the imaginary number |
double |
imag(double a)
Set the imaginary part of the complex number and returns old value |
int |
intValue()
Returns the integer value of this complex number |
Complex |
log()
Returns the logarithmic function of this complex number |
long |
longValue()
Returns the long value of this complex number |
double |
mod()
Performs the mod function on the complex number |
Complex |
mult(Complex z)
Multiplies this complex number by another complex number |
static Complex |
mult(Complex z1,
Complex z2)
Multiplies two complex numbers |
Complex |
mult(double a)
Multiplies this complex number by a constant |
void |
polar(double r,
double t)
Performs the polar function on the complex number |
Complex |
pow(double a)
Returns this complex number raised to the a complex number |
double |
real()
Returns the real part of the complex number |
double |
real(double a)
Set the real part of the complex number and returns old value |
Complex |
sign()
Performs the function on the complex number |
Complex |
sin()
Returns the sine of this complex number |
Complex |
sinh()
Returns the hyperbolic sine of this complex number |
Complex |
sqrt()
Returns the square root of this complex number |
Complex |
sub(Complex z)
Subtracts another complex number from this complex number |
static Complex |
sub(Complex z1,
Complex z2)
Subtracts two complex numbers |
Complex |
sub(double a)
Subtracts a constant from the real part of this complex number |
java.lang.String |
toString()
Return the string representation of this complex number |
Methods inherited from class java.lang.Number |
byteValue, shortValue |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected float x
protected float y
Constructor Detail |
public Complex()
public Complex(double a, double b)
a
- Real part of the complex numberb
- the imaginary part of the complex numberpublic Complex(Complex z)
Method Detail |
public double real()
public double real(double a)
public double imag()
public double imag(double a)
public double mod()
public double arg()
public Complex sign()
public Complex conj()
public void polar(double r, double t)
public boolean equals(Complex z)
public java.lang.String toString()
toString
in class java.lang.Object
public Complex add(Complex z)
public Complex sub(Complex z)
public Complex mult(Complex z)
public Complex div(Complex z)
public Complex add(double a)
a
- constant to addpublic Complex sub(double a)
a
- constant to addpublic Complex mult(double a)
a
- constant to addpublic Complex div(double a)
a
- constant to divide bypublic Complex sqrt()
public Complex exp()
public Complex log()
public Complex pow(double a)
public Complex cosh()
public Complex sinh()
public Complex cos()
public Complex sin()
public double doubleValue()
doubleValue
in class java.lang.Number
public float floatValue()
floatValue
in class java.lang.Number
public int intValue()
intValue
in class java.lang.Number
public long longValue()
longValue
in class java.lang.Number
public static Complex add(Complex z1, Complex z2)
z1
- first complex numberz2
- second complex numberpublic static Complex sub(Complex z1, Complex z2)
z1
- first complex numberz2
- second complex number (subtracted from the first)public static Complex mult(Complex z1, Complex z2)
z1
- first complex numberz2
- second complex numberpublic static Complex div(Complex z1, Complex z2)
z1
- first complex numberz2
- second complex number
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |