@Immutable
public abstract class Complex
extends Object
implements Serializable
Modifier and Type | Class and Description |
---|---|
static class |
Complex.Cartesian
Cartesian.
|
static class |
Complex.Polar
Polar.
|
Constructor and Description |
---|
Complex() |
Modifier and Type | Method and Description |
---|---|
abstract double |
abs()
Computes the absolute value of this complex number.
|
abstract Complex |
acos()
Computes the inverse cosine of this complex number.
|
abstract Complex |
add(Complex complex)
Adds an other complex number.
|
abstract double |
angle()
Returns the angle.
|
abstract double |
argument()
Computes the argument of this complex number.
|
abstract Complex |
asin()
Computes the inverse sine of this complex number.
|
abstract Complex |
atan()
Computes the inverse tangent of this complex number.
|
static Complex.Cartesian |
cartesian(double real,
double imaginary)
Returns a complex number with cartesian representation.
|
abstract Complex |
conjugate()
Returns the conjugate of this complex number.
|
abstract Complex |
cos()
Computes the cosine of this complex number.
|
abstract Complex |
cosh()
Computes the hyperbolic cosine of this complex number.
|
abstract Complex |
divide(Complex complex)
Divides by an other complex number.
|
abstract boolean |
equals(Object object) |
abstract Complex |
exp()
Computes the exponential function of this complex number.
|
abstract int |
hashCode() |
abstract double |
imaginary()
Returns the imaginary part.
|
abstract boolean |
isCartesian()
Asks if this is a cartesian representation.
|
abstract boolean |
isInfinite()
Asks if this is an infinite number.
|
abstract boolean |
isNaN()
Asks if this is not a number (NaN).
|
abstract boolean |
isPolar()
Asks if this is a polar representation.
|
abstract Complex |
log()
Computes the natural logarithm of this complex number.
|
abstract double |
magnitude()
Returns the magnitude.
|
abstract Complex |
multiply(Complex complex)
Multiplies with an other complex number.
|
abstract Complex |
negate()
Negates this number.
|
static Complex.Polar |
polar(double magnitude,
double angle)
Returns a complex number with polar representation.
|
abstract Complex |
pow(Complex complex)
Computes this complex number raised at the power of an other.
|
abstract double |
real()
Returns the real part.
|
abstract int |
signum()
Computes the signum function of this complex number.
|
abstract Complex |
sin()
Computes the sine of this complex number.
|
abstract Complex |
sinh()
Computes the hyperbolic sine of this complex number.
|
abstract Complex |
sqrt()
Computes the square root of this complex number.
|
abstract Complex |
subtract(Complex complex)
Subtracts an other complex number.
|
abstract Complex |
tan()
Computes the tangent of this complex number.
|
abstract Complex |
tanh()
Computes the hyperbolic tangent of this complex number.
|
abstract Complex.Cartesian |
toCartesian()
Returns a cartesian representation of this.
|
abstract String |
toHexString()
Returns an hexadecimal representation of this number.
|
abstract Complex.Polar |
toPolar()
Returns a polar representation of this.
|
abstract String |
toString() |
static Complex |
valueOf(String string)
Returns a complex number from the value of a string.
|
@Nonnull @CheckReturnValue public static Complex.Cartesian cartesian(double real, double imaginary)
real
- The real part.imaginary
- The imaginary part.@Nonnull @CheckReturnValue public static Complex.Polar polar(double magnitude, double angle)
magnitude
- The magnitude (r).angle
- The angle (theta).@Nonnull @CheckReturnValue public static Complex valueOf(String string)
string
- The string.@CheckReturnValue public abstract double abs()
@Nonnull @CheckReturnValue public abstract Complex acos()
@Nonnull @CheckReturnValue public abstract Complex add(@Nonnull Complex complex)
complex
- The other complex number.@CheckReturnValue public abstract double angle()
@CheckReturnValue public abstract double argument()
@Nonnull @CheckReturnValue public abstract Complex asin()
@Nonnull @CheckReturnValue public abstract Complex atan()
@Nonnull @CheckReturnValue public abstract Complex conjugate()
@Nonnull @CheckReturnValue public abstract Complex cos()
@Nonnull @CheckReturnValue public abstract Complex cosh()
@Nonnull @CheckReturnValue public abstract Complex divide(@Nonnull Complex complex)
complex
- The other complex number.public abstract boolean equals(Object object)
equals
in class Object
@Nonnull @CheckReturnValue public abstract Complex exp()
public abstract int hashCode()
hashCode
in class Object
@CheckReturnValue public abstract double imaginary()
@CheckReturnValue public abstract boolean isCartesian()
@CheckReturnValue public abstract boolean isInfinite()
@CheckReturnValue public abstract boolean isNaN()
@CheckReturnValue public abstract boolean isPolar()
@Nonnull @CheckReturnValue public abstract Complex log()
@CheckReturnValue public abstract double magnitude()
@Nonnull @CheckReturnValue public abstract Complex multiply(@Nonnull Complex complex)
complex
- The other complex number.@Nonnull @CheckReturnValue public abstract Complex negate()
@Nonnull @CheckReturnValue public abstract Complex pow(@Nonnull Complex complex)
complex
- The other complex number.@CheckReturnValue public abstract double real()
@CheckReturnValue public abstract int signum()
@Nonnull @CheckReturnValue public abstract Complex sin()
@Nonnull @CheckReturnValue public abstract Complex sinh()
@Nonnull @CheckReturnValue public abstract Complex sqrt()
@Nonnull @CheckReturnValue public abstract Complex subtract(@Nonnull Complex complex)
complex
- The other complex number.@Nonnull @CheckReturnValue public abstract Complex tan()
@Nonnull @CheckReturnValue public abstract Complex tanh()
@Nonnull @CheckReturnValue public abstract Complex.Cartesian toCartesian()
@Nonnull @CheckReturnValue public abstract String toHexString()
@Nonnull @CheckReturnValue public abstract Complex.Polar toPolar()
public abstract String toString()
toString
in class Object
Copyright © 2003-2019 Serge Brisson. All Rights Reserved.