|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.grelf.Complex
public class Complex
Complex numbers and operations upon them.
| Field Summary | |
|---|---|
double |
im
Imaginary part. |
double |
re
Real part. |
| Constructor Summary | |
|---|---|
Complex(double re,
double im)
|
|
| Method Summary | |
|---|---|
Complex |
add(Complex z)
Adds z to this and also returns this, to be chainable. |
Complex |
add(double x)
Adds real x to this and also returns this, to be chainable. |
Angle |
arg()
Returns polar angle. |
Complex |
assign(Complex z)
Sets this from z and also returns this, to be chainable. |
Complex |
clone()
Returns a new Complex object with the same fields. |
Complex |
conjugate()
Conjugates this and also returns this, to be chainable. |
Complex |
divide(Complex z)
Divides this by z and returns this, to be chainable. |
Complex |
divide(double x)
Divides this by real x and also returns this, to be chainable. |
boolean |
equals(java.lang.Object other)
|
static Complex |
expi(Angle theta)
Get exp (i.theta) = cos (theta) + i.sin (theta). |
static Complex |
expi(double theta)
Get exp (i.theta) = cos (theta) + i.sin (theta). |
int |
hashCode()
|
double |
mod()
Returns |z| = root sum of squares of real and imaginary parts. |
Complex |
multiply(Complex z)
Multiplies this by z and also returns this, to be chainable. |
Complex |
multiply(double x)
Multiplies this by real x and also returns this, to be chainable. |
Complex |
subtract(Complex z)
Subtracts z from this and also returns this, to be chainable. |
Complex |
subtract(double x)
Subtracts real x from this and also returns this, to be chainable. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public double re
public double im
| Constructor Detail |
|---|
public Complex(double re,
double im)
| Method Detail |
|---|
public Complex clone()
clone in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object other)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic double mod()
public Angle arg()
public Complex conjugate()
public Complex assign(Complex z)
public Complex add(Complex z)
public Complex add(double x)
public Complex subtract(Complex z)
public Complex subtract(double x)
public Complex multiply(Complex z)
public Complex multiply(double x)
public Complex divide(Complex z)
public Complex divide(double x)
public static Complex expi(double theta)
public static Complex expi(Angle theta)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||