|
jfract V1.0a | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--org.jfract.math.Complex
This class is used to modeling a complex number
| Field Summary | |
(package private) double |
Im
The imaginary part of the complex |
(package private) double |
Re
The Real part of the complex |
| Constructor Summary | |
Complex(double Re,
double Im)
The constructor |
|
| Method Summary | |
Complex |
add(Complex Z)
Add a complex |
Complex |
div(Complex Z)
divide by a complex |
Complex |
div(double d)
divide by a double |
double |
getIm()
get the Im part |
double |
getRe()
Get the real part |
static Complex |
inverse(Complex C)
inverse the complex |
Complex |
minus(Complex Z)
minus a complex |
double |
mod()
|
double |
mod2()
|
Complex |
mul(Complex Z)
Multiply by a complex |
Complex |
mul(double d)
Multiply by a double |
Complex |
pow(int i)
pow the complex |
void |
setIm(double Im)
Set th im part |
void |
setRe(double Re)
set the real part |
Complex |
sub(Complex Z)
Substract a complex |
java.lang.String |
toString()
get a string representation |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
double Re
double Im
| Constructor Detail |
public Complex(double Re,
double Im)
Re - the real partIm - the im part| Method Detail |
public double getRe()
public double getIm()
public void setRe(double Re)
public void setIm(double Im)
public double mod()
public double mod2()
public Complex add(Complex Z)
Z - the complex to addpublic Complex minus(Complex Z)
Z - the complex to addpublic Complex sub(Complex Z)
Z - the complex to subpublic Complex mul(Complex Z)
Z - the colmplex to multiplypublic Complex mul(double d)
public static Complex inverse(Complex C)
public Complex div(Complex Z)
Z - the complex to be divedpublic Complex div(double d)
public java.lang.String toString()
toString in class java.lang.Object
public Complex pow(int i)
throws java.lang.IllegalArgumentException
i - the power
|
jfract V1.0a | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||