public final class Complex extends Number
| Modifier and Type | Field and Description |
|---|---|
static Complex |
i
Complex unit i.
|
static Complex |
ONE |
| Constructor and Description |
|---|
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.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
byteValue, shortValuepublic static final Complex i
public static final Complex ONE
public Complex(double re,
double im)
re - real partim - imaginary partpublic Complex()
public Complex(double re)
re - real partpublic Complex(Complex z)
z - complex numberpublic static Complex createComplexFromA(double phi)
phi - argumentpublic static Complex createComplexFromRA(double radius, double phi)
radius - radiusphi - argumentpublic boolean equals(Object obj)
this.public int hashCode()
public 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 double arg()
public Complex plus(Complex z)
z - right hand sidepublic Complex plus(double x)
x - the real number to addpublic Complex minus(Complex z)
z - right hand sidepublic Complex minus(double x)
x - the real numberpublic Complex times(Complex z)
z - right hand sidepublic Complex times(double x)
x - right hand sidepublic Complex divideBy(Complex z) throws ArithmeticException
z - complex right hand sideArithmeticException - if mag(z) == 0public Complex axpb(double a, double b)
a - real factorb - real numberpublic Complex axpb(Complex a, Complex b)
a - complex factorb - complex numberpublic static Complex sin(Complex z)
z - complex argumentpublic static Complex cos(Complex z)
z - complex argumentpublic static Complex tan(Complex z)
z - complex argumentpublic static Complex pow(Complex z)
z - complex argumentpublic static Complex sinh(Complex z)
z - complex argumentpublic static Complex cosh(Complex z)
z - complex argumentpublic static Complex tanh(Complex z) throws ArithmeticException
z - complex argumentArithmeticExceptionpublic static double tanh(double x)
throws ArithmeticException
x - double argumentArithmeticExceptionpublic static Complex atan(Complex z) throws ArithmeticException
z - complex argumentArithmeticExceptionpublic static Complex exp(Complex z)
z - complex argumentpublic static Complex ln(Complex z)
z - complex argumentpublic static Complex sqrt(Complex z)
z - complex argumentpublic static Complex asin(Complex z)
z - complex argumentpublic static Complex atanh(Complex z) throws ArithmeticException
z - complex argumentArithmeticExceptionpublic static double atanh(double x)
throws ArithmeticException
x - complex argumentArithmeticExceptionCopyright © 2019 CNRS. All rights reserved.