|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.Number
org.cts.util.Complex
public final class Complex
Complex number, arithmetics, and complex functions.
| Field Summary | |
|---|---|
static Complex |
i
Complex unit i. |
static Complex |
ONE
|
| Constructor Summary | |
|---|---|
Complex()
Constructs complex number zero. |
|
Complex(Complex z)
Copy the complex number in parameter. |
|
Complex(double re)
Constructs a complex number with imaginary part zero. |
|
Complex(double re,
double im)
Constructs a complex number from real part and imaginary part. |
|
| Method Summary | |
|---|---|
double |
arg()
Returns the argument of this complex number. |
static Complex |
asin(Complex z)
Computes complex arcsine. |
static Complex |
atan(Complex z)
Computes complex arctangent. |
static Complex |
atanh(Complex z)
Computes complex arctangent. |
static double |
atanh(double x)
Computes hyperbolic arctangent of a double using complex arithmetic. |
Complex |
axpb(Complex a,
Complex b)
Computes linear combination 'a times x plus b'. |
Complex |
axpb(double a,
double b)
Computes linear combination 'a times x plus b'. |
Complex |
conj()
Returns the conjugate complex number. |
static Complex |
cos(Complex z)
Computes complex cosine. |
static Complex |
cosh(Complex z)
Computes hyperbolic cosine. |
static Complex |
createComplexFromA(double phi)
Returns a complex number with magnitude one and arbitrary argument. |
static Complex |
createComplexFromRA(double radius,
double phi)
Returns a complex number from radius/magnitude and argument. |
Complex |
divideBy(Complex z)
Computes fraction between this and the complex number z. |
double |
doubleValue()
|
boolean |
equals(Object obj)
Returns true if the object in parameter is equals to this. |
static Complex |
exp(Complex z)
Computes complex exponential. |
float |
floatValue()
|
int |
hashcode()
|
int |
hashCode()
Returns the hash code for this Complex. |
double |
im()
Returns the imaginary part of the complex number. |
int |
intValue()
|
boolean |
isReal()
Return true, if imaginary part of complex number is (numerically) zero. |
static Complex |
ln(Complex z)
Computes complex natural logarithm. |
long |
longValue()
|
double |
mag()
Return magnitude of complex number. |
Complex |
minus(Complex z)
Provides difference of this and right hand side. |
Complex |
minus(double x)
Provides difference of this and a real number. |
Complex |
plus(Complex z)
Provides sum of this and right hand side. |
Complex |
plus(double x)
Provides sum of this and a real number. |
static Complex |
pow(Complex z)
Computes complex power. |
double |
re()
Returns the real part of the complex number. |
static Complex |
sin(Complex z)
Computes complex sine. |
static Complex |
sinh(Complex z)
Computes hyperbolic sine. |
static Complex |
sqrt(Complex z)
Computes complex square root. |
static Complex |
tan(Complex z)
Computes complex tangent. |
static Complex |
tanh(Complex z)
Computes hyperbolic tangent. |
static double |
tanh(double x)
Computes hyperbolic tangent of a double using complex arithmetic. |
Complex |
times(Complex z)
Provides product of this and complex right hand side. |
Complex |
times(double x)
Provides product of this and float right hand side. |
String |
toString()
Returns string representation of this. |
| Methods inherited from class java.lang.Number |
|---|
byteValue, shortValue |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final Complex i
public static final Complex ONE
| Constructor Detail |
|---|
public Complex(double re,
double im)
re - real partim - imaginary partpublic Complex()
public Complex(double re)
re - real partpublic Complex(Complex z)
z - complex number| Method Detail |
|---|
public static Complex createComplexFromA(double phi)
phi - argument
public static Complex createComplexFromRA(double radius,
double phi)
radius - radiusphi - argumentpublic boolean equals(Object obj)
this.
equals in class Objectobj - public int hashCode()
hashCode in class Objectpublic int hashcode()
public double re()
public double im()
public Complex conj()
public boolean isReal()
public double mag()
public double doubleValue()
doubleValue in class Numberpublic float floatValue()
floatValue in class Numberpublic long longValue()
longValue in class Numberpublic int intValue()
intValue in class Numberpublic double arg()
public Complex plus(Complex z)
z - right hand side
public Complex plus(double x)
x - the real number to add
public Complex minus(Complex z)
z - right hand side
public Complex minus(double x)
x - the real number
public Complex times(Complex z)
z - right hand side
public Complex times(double x)
x - right hand side
public Complex divideBy(Complex z)
throws ArithmeticException
z - complex right hand side
ArithmeticException - if mag(z) == 0
public Complex axpb(double a,
double b)
a - real factorb - real number
public Complex axpb(Complex a,
Complex b)
a - complex factorb - complex number
public static Complex sin(Complex z)
z - complex argument
public static Complex cos(Complex z)
z - complex argument
public static Complex tan(Complex z)
z - complex argument
public static Complex pow(Complex z)
z - complex argument
public static Complex sinh(Complex z)
z - complex argument
public static Complex cosh(Complex z)
z - complex argument
public static Complex tanh(Complex z)
throws ArithmeticException
z - complex argument
ArithmeticException
public static double tanh(double x)
throws ArithmeticException
x - double argument
ArithmeticException
public static Complex atan(Complex z)
throws ArithmeticException
z - complex argument
ArithmeticExceptionpublic static Complex exp(Complex z)
z - complex argument
public static Complex ln(Complex z)
z - complex argument
public static Complex sqrt(Complex z)
z - complex argument
public static Complex asin(Complex z)
z - complex argument
public static Complex atanh(Complex z)
throws ArithmeticException
z - complex argument
ArithmeticException
public static double atanh(double x)
throws ArithmeticException
x - complex argument
ArithmeticExceptionpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||