|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--drasys.or.Complex
An implementation of a complex value.
Field Summary | |
double |
imag
|
double |
real
|
Constructor Summary | |
Complex()
|
|
Complex(ComplexI c)
|
|
Complex(double r)
|
|
Complex(double r,
double i)
|
Method Summary | |
Complex |
add(ComplexI a)
Compute: this = this + a; |
static Complex |
add(ComplexI a,
ComplexI b)
Compute: result = a + b; |
static Complex |
add(ComplexI a,
ComplexI b,
Complex results)
Compute: result = a + b; |
Complex |
add(double r)
Compute: this = this + (r,0); |
Complex |
add(double r,
double i)
Compute: this = this + (r,i); |
static Complex |
add(double r1,
double i1,
double r2,
double i2,
Complex results)
Compute: result = (r1,i1) + (r2,i2); |
Complex |
conjugate()
Compute: this = conjugate(this). |
Complex |
divide(ComplexI a)
Compute: this = this / a; |
static Complex |
divide(ComplexI a,
ComplexI b)
Compute: result = a / b; |
static Complex |
divide(ComplexI a,
ComplexI b,
Complex results)
Compute: result = a / b; |
Complex |
divide(double r)
Compute: this = this / (r,0); |
Complex |
divide(double r,
double i)
Compute: this = this / (r,i); |
static Complex |
divide(double r1,
double i1,
double r2,
double i2,
Complex results)
Compute: result = (r1,i1) / (r2,i2); |
boolean |
equals(ComplexI a)
returns 'true' if this is equal to 'a'. |
static boolean |
equals(ComplexI a,
ComplexI b,
double epsilon)
returns 'true' if a is equal to b to within 'epsilon'. |
boolean |
equals(ComplexI a,
double epsilon)
returns 'true' if this is equal to 'a' to within 'epsilon'. |
boolean |
equals(double r,
double i)
returns 'true' if this is equal to (r,i). |
boolean |
equals(double r,
double i,
double epsilon)
returns 'true' if this is equal to (r,i) to within 'epsilon'. |
static boolean |
equals(double r1,
double i1,
double r2,
double i2,
double epsilon)
returns 'true' if (r1,i1) is equal to (r2,i2) to within 'epsilon'. |
boolean |
equals(java.lang.Object o)
returns 'true' this is equal to 'o'. |
double |
getImag()
Return the imaginary part; |
double |
getReal()
Return the real part. |
Complex |
invert()
Compute: this = (1,0)/this. |
static Complex |
invert(ComplexI a)
Compute: new = (1,0)/a. |
static Complex |
invert(ComplexI a,
Complex results)
Compute: results = (1,0)/a. |
static Complex |
invert(double real,
double imag,
Complex results)
Compute: results = (1,0)/(real,imag). |
double |
modulus()
Computes sqrt(this.real^2 + this.imag^2). |
static double |
modulus(ComplexI a)
Computes sqrt(real^2 + imag^2). |
static double |
modulus(double real,
double imag)
Computes sqrt(real^2 + imag^2). |
Complex |
multiply(ComplexI a)
Compute: this = this * a; |
static Complex |
multiply(ComplexI a,
ComplexI b)
Compute: result = a * b; |
static Complex |
multiply(ComplexI a,
ComplexI b,
Complex results)
Compute: result = a * b; |
Complex |
multiply(double r)
Compute: this = this * (r,0); |
Complex |
multiply(double r,
double i)
Compute: this = this * (r,i); |
static Complex |
multiply(double r1,
double i1,
double r2,
double i2,
Complex results)
Compute: result = (r1,i1) * (r2,i2); |
Complex |
set(ComplexI a)
Sets this equal to a; |
Complex |
set(double r,
double i)
Sets this equal to a; |
Complex |
sqrt()
Compute: this = this^0.5. |
static Complex |
sqrt(ComplexI a)
Compute: new = a^0.5. |
static Complex |
sqrt(ComplexI a,
Complex results)
Compute: results = a^0.5. |
static Complex |
sqrt(double real,
double imag,
Complex results)
Compute: results = (real,imag)^0.5. |
Complex |
subtract(ComplexI a)
Compute: this = this - a; |
static Complex |
subtract(ComplexI a,
ComplexI b)
Compute: result = a - b; |
static Complex |
subtract(ComplexI a,
ComplexI b,
Complex results)
Compute: result = a - b; |
Complex |
subtract(double r)
Compute: this = this - (r,0); |
Complex |
subtract(double r,
double i)
Compute: this = this - (r,i); |
static Complex |
subtract(double r1,
double i1,
double r2,
double i2,
Complex results)
Compute: result = (r1,i1) - (r2,i2); |
java.lang.String |
toString()
Returns a string representation of this complex number. |
Methods inherited from class java.lang.Object |
clone,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
public double real
public double imag
Constructor Detail |
public Complex()
public Complex(double r)
public Complex(double r, double i)
public Complex(ComplexI c)
Method Detail |
public static double modulus(double real, double imag)
public static double modulus(ComplexI a)
public double modulus()
public static Complex invert(double real, double imag, Complex results)
public static Complex invert(ComplexI a)
public static Complex invert(ComplexI a, Complex results)
public Complex invert()
public static Complex sqrt(double real, double imag, Complex results)
public static Complex sqrt(ComplexI a)
public static Complex sqrt(ComplexI a, Complex results)
public Complex sqrt()
public Complex conjugate()
public static Complex add(double r1, double i1, double r2, double i2, Complex results)
public static Complex add(ComplexI a, ComplexI b, Complex results)
public static Complex add(ComplexI a, ComplexI b)
public Complex add(double r, double i)
public Complex add(double r)
public Complex add(ComplexI a)
public static Complex subtract(double r1, double i1, double r2, double i2, Complex results)
public static Complex subtract(ComplexI a, ComplexI b, Complex results)
public static Complex subtract(ComplexI a, ComplexI b)
public Complex subtract(double r, double i)
public Complex subtract(double r)
public Complex subtract(ComplexI a)
public static Complex multiply(double r1, double i1, double r2, double i2, Complex results)
public static Complex multiply(ComplexI a, ComplexI b, Complex results)
public static Complex multiply(ComplexI a, ComplexI b)
public Complex multiply(double r, double i)
public Complex multiply(double r)
public Complex multiply(ComplexI a)
public static Complex divide(double r1, double i1, double r2, double i2, Complex results)
public static Complex divide(ComplexI a, ComplexI b, Complex results)
public static Complex divide(ComplexI a, ComplexI b)
public Complex divide(double r, double i)
public Complex divide(double r)
public Complex divide(ComplexI a)
public Complex set(double r, double i)
public Complex set(ComplexI a)
public double getReal()
public double getImag()
public static boolean equals(double r1, double i1, double r2, double i2, double epsilon)
public static boolean equals(ComplexI a, ComplexI b, double epsilon)
public boolean equals(double r, double i)
public boolean equals(ComplexI a)
public boolean equals(double r, double i, double epsilon)
public boolean equals(ComplexI a, double epsilon)
public boolean equals(java.lang.Object o)
public java.lang.String toString()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |