public class Cdouble
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static Cdouble |
DBL_I
The complex constant (0.0,1.0).
|
double |
i
The imaginary part.
|
double |
r
The real part.
|
Constructor and Description |
---|
Cdouble()
Constructs a complex number with zero real and imaginary parts.
|
Cdouble(Cdouble x)
Constructs a copy of the specified complex number.
|
Cdouble(double r)
Constructs a complex number with zero imaginary part.
|
Cdouble(double r,
double i)
Constructs a complex number.
|
Modifier and Type | Method and Description |
---|---|
double |
abs()
Returns the magnitude of this complex number.
|
static double |
abs(Cdouble x)
Returns the magnitude of a complex number.
|
static Cdouble |
add(Cdouble x,
Cdouble y)
Returns the sum x + y.
|
double |
arg()
Returns the argument of this complex number.
|
static double |
arg(Cdouble x)
Returns the argument of a complex number.
|
Cdouble |
conj()
Returns the complex conjugate of this complex number.
|
static Cdouble |
conj(Cdouble x)
Returns the conjugate of x.
|
Cdouble |
conjEquals()
Returns the conjugate z = conj(z), where z is this complex number.
|
Cdouble |
cos()
Returns the cosine of this complex number.
|
static Cdouble |
cos(Cdouble x)
Returns the cosine of a complex number.
|
Cdouble |
cosh()
Returns the hyberbolic cosine of this complex number.
|
static Cdouble |
cosh(Cdouble x)
Returns the hyperbolic cosine of a complex number.
|
static Cdouble |
div(Cdouble x,
Cdouble y)
Returns the quotient x * y.
|
boolean |
equals(java.lang.Object obj) |
Cdouble |
exp()
Returns the exponential of this complex number.
|
static Cdouble |
exp(Cdouble x)
Returns the exponential of a complex number.
|
int |
hashCode() |
Cdouble |
inv()
Returns the complex inverse of this complex number.
|
static Cdouble |
inv(Cdouble x)
Returns the inverse of x.
|
Cdouble |
invEquals()
Returns the inverse z = inv(z), where z is this complex number.
|
boolean |
isImag()
Determines whether this complex number is imaginary (has zero real part).
|
static boolean |
isImag(Cdouble x)
Determines whether x is imaginary (has zero real part).
|
boolean |
isReal()
Determines whether this complex number is real (has zero imaginary part).
|
static boolean |
isReal(Cdouble x)
Determines whether x is real (has zero imaginary part).
|
Cdouble |
log()
Returns the natural logarithm of this complex number.
|
static Cdouble |
log(Cdouble x)
Returns the natural logarithm of a complex number.
|
Cdouble |
log10()
Returns the logarithm base 10 of this complex number.
|
static Cdouble |
log10(Cdouble x)
Returns the logarithm base 10 of a complex number.
|
Cdouble |
minus(Cdouble x)
Returns the difference z - x, where z is this complex number.
|
Cdouble |
minus(double x)
Returns the difference z - x, where z is this complex number.
|
Cdouble |
minusEquals(Cdouble x)
Returns the difference z -= x, where z is this complex number.
|
Cdouble |
minusEquals(double x)
Returns the difference z -= x, where z is this complex number.
|
static Cdouble |
mul(Cdouble x,
Cdouble y)
Returns the product x * y.
|
Cdouble |
neg()
Returns the complex negative of this complex number.
|
static Cdouble |
neg(Cdouble x)
Returns the negative of x.
|
Cdouble |
negEquals()
Returns the negative z = neg(z), where z is this complex number.
|
double |
norm()
Returns the norm of this complex number.
|
static double |
norm(Cdouble x)
Returns the norm of a complex number.
|
Cdouble |
over(Cdouble x)
Returns the quotent z / x, where z is this complex number.
|
Cdouble |
over(double x)
Returns the quotent z / x, where z is this complex number.
|
Cdouble |
overEquals(Cdouble x)
Returns the quotient z /= x, where z is this complex number.
|
Cdouble |
overEquals(double x)
Returns the quotient z /= x, where z is this complex number.
|
Cdouble |
plus(Cdouble x)
Returns the sum z + x, where z is this complex number.
|
Cdouble |
plus(double x)
Returns the sum z + x, where z is this complex number.
|
Cdouble |
plusEquals(Cdouble x)
Returns the sum z += x, where z is this complex number.
|
Cdouble |
plusEquals(double x)
Returns the sum z += x, where z is this complex number.
|
static Cdouble |
polar(double r,
double a)
Returns the complex number (r*cos(a),r*sin(a)).
|
Cdouble |
pow(Cdouble y)
Returns z to the y'th power, where z is this complex number.
|
static Cdouble |
pow(Cdouble x,
Cdouble y)
Returns x to the y'th power.
|
static Cdouble |
pow(Cdouble x,
double y)
Returns x to the y'th power.
|
Cdouble |
pow(double y)
Returns z to the y'th power, where z is this complex number.
|
static Cdouble |
pow(double x,
Cdouble y)
Returns x to the y'th power.
|
Cdouble |
sin()
Returns the sine of this complex number.
|
static Cdouble |
sin(Cdouble x)
Returns the sine of a complex number.
|
Cdouble |
sinh()
Returns the hyberbolic sine of this complex number.
|
static Cdouble |
sinh(Cdouble x)
Returns the hyperbolic sine of a complex number.
|
Cdouble |
sqrt()
Returns the square-root of this complex number.
|
static Cdouble |
sqrt(Cdouble x)
Returns the square root of a complex number.
|
static Cdouble |
sub(Cdouble x,
Cdouble y)
Returns the difference x - y.
|
Cdouble |
tan()
Returns the tangent of this complex number.
|
static Cdouble |
tan(Cdouble x)
Returns the tangent of a complex number.
|
Cdouble |
tanh()
Returns the hyberbolic tangent of this complex number.
|
static Cdouble |
tanh(Cdouble x)
Returns the hyperbolic tangent of a complex number.
|
Cdouble |
times(Cdouble x)
Returns the product z * x, where z is this complex number.
|
Cdouble |
times(double x)
Returns the product z * x, where z is this complex number.
|
Cdouble |
timesEquals(Cdouble x)
Returns the product z *= x, where z is this complex number.
|
Cdouble |
timesEquals(double x)
Returns the product z *= x, where z is this complex number.
|
java.lang.String |
toString() |
public static final Cdouble DBL_I
public double r
public double i
public Cdouble()
public Cdouble(double r)
r
- the real part.public Cdouble(double r, double i)
r
- the real part.i
- the imaginary part.public Cdouble(Cdouble x)
x
- the complex number.public Cdouble plus(Cdouble x)
x
- a complex number.public Cdouble minus(Cdouble x)
x
- a complex number.public Cdouble times(Cdouble x)
x
- a complex number.public Cdouble over(Cdouble x)
x
- a complex number.public Cdouble plus(double x)
x
- a real number.public Cdouble minus(double x)
x
- a real number.public Cdouble times(double x)
x
- a real number.public Cdouble over(double x)
x
- a real number.public Cdouble plusEquals(Cdouble x)
x
- a complex number.public Cdouble minusEquals(Cdouble x)
x
- a complex number.public Cdouble timesEquals(Cdouble x)
x
- a complex number.public Cdouble overEquals(Cdouble x)
x
- a complex number.public Cdouble plusEquals(double x)
x
- a real number.public Cdouble minusEquals(double x)
x
- a real number.public Cdouble timesEquals(double x)
x
- a real number.public Cdouble overEquals(double x)
x
- a real number.public Cdouble conjEquals()
public Cdouble invEquals()
public Cdouble negEquals()
public boolean isReal()
public boolean isImag()
public Cdouble conj()
public Cdouble inv()
public Cdouble neg()
public double abs()
public double arg()
public double norm()
public Cdouble sqrt()
public Cdouble exp()
public Cdouble log()
public Cdouble log10()
public Cdouble pow(double y)
y
- a real number.public Cdouble pow(Cdouble y)
y
- a complex number.public Cdouble sin()
public Cdouble cos()
public Cdouble tan()
public Cdouble sinh()
public Cdouble cosh()
public Cdouble tanh()
public static boolean isReal(Cdouble x)
x
- a complex number.public static boolean isImag(Cdouble x)
x
- a complex number.public static Cdouble conj(Cdouble x)
x
- a complex number.public static Cdouble inv(Cdouble x)
x
- a complex number.public static Cdouble neg(Cdouble x)
x
- a complex number.public static Cdouble polar(double r, double a)
r
- the polar radius.a
- the polar angle.public static Cdouble add(Cdouble x, Cdouble y)
x
- a complex number.y
- a complex number.public static Cdouble sub(Cdouble x, Cdouble y)
x
- a complex number.y
- a complex number.public static Cdouble mul(Cdouble x, Cdouble y)
x
- a complex number.y
- a complex number.public static Cdouble div(Cdouble x, Cdouble y)
x
- a complex number.y
- a complex number.public static double abs(Cdouble x)
x
- a complex number.public static double arg(Cdouble x)
x
- a complex number.public static double norm(Cdouble x)
x
- a complex number.public static Cdouble sqrt(Cdouble x)
x
- a complex number.public static Cdouble exp(Cdouble x)
x
- a complex number.public static Cdouble log(Cdouble x)
x
- a complex number.public static Cdouble log10(Cdouble x)
x
- a complex number.public static Cdouble pow(Cdouble x, double y)
x
- a complex number.y
- a real number.public static Cdouble pow(double x, Cdouble y)
x
- a real number.y
- a complex number.public static Cdouble pow(Cdouble x, Cdouble y)
x
- a complex number.y
- a complex number.public static Cdouble sin(Cdouble x)
x
- a complex number.public static Cdouble cos(Cdouble x)
x
- a complex number.public static Cdouble tan(Cdouble x)
x
- a complex number.public static Cdouble sinh(Cdouble x)
x
- a complex number.public static Cdouble cosh(Cdouble x)
x
- a complex number.public static Cdouble tanh(Cdouble x)
x
- a complex number.public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object