|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object vmm.core.Complex
public class Complex
A complex number, with a real and an imaginary part. (Possibley to be replaced with a class that has better support for complex arithmetic and functions of a complex variable.)
Field Summary | |
---|---|
static Complex |
I_C
|
double |
im
|
static Complex |
ONE_C
|
double |
re
|
static Complex |
ZERO_C
|
Constructor Summary | |
---|---|
Complex()
Create a complex number initially equal to zero |
|
Complex(Complex c)
Create a new complex number that is initially equal to a given complex number. |
|
Complex(double x)
Create a complex number initially equal to the real number x. |
|
Complex(double x,
double y)
Create a complex number initially equal to x + iy |
Method Summary | |
---|---|
double |
abs2()
Returns the absolute value squared of this. |
void |
assign_PlusTimes(Complex a,
Complex b)
|
void |
assign_PlusTimes(Complex a,
double d)
|
void |
assign(Complex c)
|
void |
assign(double x,
double y)
|
void |
assignDivide(Complex c)
|
void |
assignInvert()
|
void |
assignMinus(Complex c)
|
void |
assignPlus(Complex c)
|
void |
assignPlus(Complex a,
Complex b)
|
void |
assignPlusTimes(Complex a,
Complex b)
|
void |
assignPow(Complex z,
double x)
|
void |
assignTimes_PlusTimes(Complex a,
Complex b,
double d)
|
void |
assignTimes(Complex c)
|
void |
assignTimes(Complex a,
Complex b)
|
void |
assignTimes(Complex c,
double d)
|
void |
assignTimes(double d)
|
void |
assignTimesPlus(Complex a,
Complex b)
|
void |
assignTimesTimes(Complex a,
double d)
|
Complex |
complexLinComb(Complex a,
Complex b,
Complex c)
z.complexLinComb(a,b,c) returns a*z+b*c, Complex a,b; |
Complex |
conj()
Computes the conjugate of a complex number. |
double |
cosh(double x)
|
double |
det(Complex c)
|
Complex |
dividedBy(Complex c)
Returns this / c; c must be non-null. |
Complex |
dividedBy(double x)
|
double |
dot(Complex c)
z.dot(c) returns the scalar product z.re*c.re + z.im*c.im |
boolean |
equals(java.lang.Object obj)
Returns true if obj is equal to this complex number. |
Complex |
exponential()
Computes the complex exponential function, e^z, where z is this complex number. |
Complex |
integerPower(int k)
Returns new Complex(this^k), for |k|< 9 using multiplication, for larger |k| using exp(k*log(this)) |
Complex |
integerRoot(int k)
Returns a complex k-th root of this complex number. |
Complex |
inverse()
Computes the complex reciprocal function, 1/z, where z is this complex number. |
Complex |
invert()
|
Complex |
log()
|
Complex |
logNearer(Complex previous)
Computes that complex logarithm of this complex number that is nearest to previous. |
Complex |
minus(Complex c)
Returns this - c; c must be non-null. |
Complex |
minus(double x)
|
Complex |
mobius1_1(double r)
The Moebius transformation ((1+r)z + r)/(rz + 1+r) has +1,-1 as fixed points. |
Complex |
plus(Complex c)
Returns this + c; c must be non-null. |
Complex |
plus(double x)
|
static Complex |
polar(double r,
double theta)
Returns the complex number (r*cos(theta)) + i*(r*sin(theta)). |
Complex |
power(double x)
|
double |
r()
Returns the absolute value, "r" in polar coordinates, of this. |
Complex |
realLinComb(double a,
double b,
Complex c)
z.realLinComb(a,b,c) returns a*z+b*c, double a,b; |
Complex |
sine()
|
double |
sinh(double x)
|
Complex |
squareRootNearer(Complex previous)
Computes that square root of this complex number that is nearer to previous than to minus previous. |
double[] |
stereographicProjection()
|
double |
theta()
Returns arg(this), the angular polar coordinate of this complex number, in the range -pi to pi. |
Complex |
times(Complex c)
Returns this * c; c must be non-null. |
Complex |
times(double x)
|
java.lang.String |
toString()
Returns a string representation of the form a, i, -i, i*b, -i*b, a + i, a - i, a + i*b, or a - i*b. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final Complex ZERO_C
public static final Complex ONE_C
public static final Complex I_C
public double re
public double im
Constructor Detail |
---|
public Complex()
public Complex(double x)
public Complex(double x, double y)
public Complex(Complex c)
c
- The complex number to be copied. If null, it is treated as zero.Method Detail |
---|
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public Complex conj()
public static Complex polar(double r, double theta)
public Complex plus(Complex c)
public Complex minus(Complex c)
public Complex times(Complex c)
public Complex dividedBy(Complex c)
public Complex times(double x)
public Complex plus(double x)
public Complex minus(double x)
public Complex dividedBy(double x)
public Complex realLinComb(double a, double b, Complex c)
public Complex complexLinComb(Complex a, Complex b, Complex c)
public double dot(Complex c)
public double abs2()
public double r()
public double theta()
public Complex exponential()
public Complex inverse()
public Complex log()
public Complex logNearer(Complex previous)
public double sinh(double x)
public double cosh(double x)
public Complex sine()
public Complex power(double x)
public Complex integerPower(int k)
public Complex integerRoot(int k)
public Complex squareRootNearer(Complex previous)
public Complex mobius1_1(double r)
public double[] stereographicProjection()
public void assign(double x, double y)
public java.lang.String toString()
toString
in class java.lang.Object
public void assign(Complex c)
public double det(Complex c)
public void assignTimes(double d)
public void assignInvert()
public void assignPow(Complex z, double x)
public void assignPlus(Complex a, Complex b)
public void assignPlus(Complex c)
public void assignMinus(Complex c)
public void assignTimes(Complex c, double d)
public void assignTimes(Complex c)
public void assignTimes(Complex a, Complex b)
public void assignDivide(Complex c)
public void assignTimesTimes(Complex a, double d)
public void assignPlusTimes(Complex a, Complex b)
public void assignTimesPlus(Complex a, Complex b)
public void assign_PlusTimes(Complex a, Complex b)
public void assign_PlusTimes(Complex a, double d)
public void assignTimes_PlusTimes(Complex a, Complex b, double d)
public Complex invert()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |