All Packages Class Hierarchy This Package Previous Next Index
Class com.ibm.math.Complex
java.lang.Object
|
+----com.ibm.math.Complex
- public final class Complex
- extends Object
This Class represents double precision complex numbers.
The representation contains the real and imaginary parts of
a complex number.
-
im
- The imaginary part of the complex number
-
re
-
The real part of the complex number
-
Complex(Complex)
- Copy constructor, builds a new complex object based on another Complex object's value.
-
Complex(double, double)
- Construct a new Complex Object given it's real and imaginary parts.
-
abs()
- Computes the absolute value of this complex number.
-
abs(Complex)
- Computes the absolute value of a complex number.
-
assign(Complex)
- Assign the value of a complex number to this complex number.
-
conj()
- Computes the conjugate of this complex number.
-
conj(Complex)
- Computes the conjugate of a complex number.
-
div(Complex)
- Computes the result of the division of this complex number
by another complex number.
-
div(Complex, Complex)
- Computes the result of the division of the complex number a
by the complex number b.
-
div(Complex, double)
- Computes the result of the division of the complex number a
by the real number b.
-
div(double)
- Computes the result of the division of this complex number
by a double value.
-
div(double, Complex)
- Computes the result of the division of the real number a
by the complex number b.
-
divAssign(Complex)
- Computes the result of the division of this complex number
by another complex number and store the result in this object.
-
divAssign(double)
- Computes the result of the division of this complex number
by a double precision number and store the result in this object.
-
equals(Complex)
- Computes if two complex numbers have the same value.
-
imag()
- Computes the imaginary part of this complex number
-
imag(Complex)
- Computes the imaginary part of a given complex number
-
minus(Complex)
- Computes the result of this complex number minus a double.
-
minus(Complex, Complex)
- Computes the result of a complex number a minus another complex number b.
-
minus(Complex, double)
- Computes the result of a complex number minus a real.
-
minus(double)
- Computes the result of the subtraction of this Complex number by a
double.
-
minus(double, Complex)
- Computes the result of a real number minus a complex number.
-
minusAssign(Complex)
- Computes the result of this complex number minus another complex number
and store the result in this object.
-
minusAssign(double)
- Computes the result of this complex number minus a real number
and store the result in this object.
-
phase()
- Computes the angle between the real axis and the vector
representing this complex number.
-
phase(Complex)
- Computes the angle between the real axis and the vector
representing a complex number.
-
plus(Complex)
- Adds this Complex number to another Complex number and
return the result in a new Complex object.
-
plus(Complex, Complex)
- Adds the value of two complex numbers.
-
plus(Complex, double)
- Adds the value of two numbers.
-
plus(double)
- Adds this complex number to a real number and
return the result in a new Complex object.
-
plus(double, Complex)
- Adds the value of two complex numbers.
-
plusAssign(Complex)
- Adds this complex number to another complex number and
store the result in this object.
-
plusAssign(double)
- Adds this complex number to a real number and
store the result in this object.
-
real()
- Computes the real part of this complex number
-
real(Complex)
- Computes the real part of a given complex number
-
sqrt()
- Computes the square root of the complex number.
-
sqrt(Complex)
- Computes the square root of a complex number.
-
times(Complex)
- Multiplies this complex number by another complex number
and return the result in a new Complex object.
-
times(Complex, Complex)
- Multiplies two complex numbers.
-
times(Complex, double)
- Multiplies a complex and a real number.
-
times(double)
- Multiplies this complex number by a real number
and return the result in a new Complex object.
-
times(double, Complex)
- Multiplies a complex and a real number.
-
timesAssign(Complex)
- Multiplies this complex number by another complex number
and store the result in this object.
-
timesAssign(double)
- Multiplies this complex number by a real number
and store the result in this object.
-
toString()
- Returns a string representation of the Complex object's value
-
unequals(Complex)
- Computes if two complex numbers have diferent values.
re
public double re
- The real part of the complex number
im
public double im
- The imaginary part of the complex number
Complex
public Complex(double re,
double im)
- Construct a new Complex Object given it's real and imaginary parts.
- Parameters:
- re - double Real part
- im - double Imaginary part
Complex
public Complex(Complex other)
- Copy constructor, builds a new complex object based on another Complex object's value.
- Parameters:
- other - Complex The complex object to copy.
abs
public final double abs()
- Computes the absolute value of this complex number.
- Returns:
- double The absolute value.
abs
public static final double abs(Complex a)
- Computes the absolute value of a complex number.
- Parameters:
- other - Complex The complex number.
- Returns:
- double The absolute value
assign
public final Complex assign(Complex other)
- Assign the value of a complex number to this complex number.
- Returns:
- Complex Reference to this complex number.
conj
public final Complex conj()
- Computes the conjugate of this complex number.
- Returns:
- Complex The conjugate Complex
conj
public static final Complex conj(Complex a)
- Computes the conjugate of a complex number.
- Parameters:
- a - Complex The source complex number.
- Returns:
- Complex The conjugate Complex
div
public Complex div(double other)
- Computes the result of the division of this complex number
by a double value.
- Parameters:
- other - double The divisor.
- Returns:
- Complex A new Complex object containing the result of the operation.
div
public static final Complex div(double a,
Complex b)
- Computes the result of the division of the real number a
by the complex number b.
- Parameters:
- a - double The dividend
- b - Complex The divisor
- Returns:
- Complex The result of the operation
div
public final Complex div(Complex other)
- Computes the result of the division of this complex number
by another complex number.
- Parameters:
- other - Complex The divisor.
- Returns:
- Complex A new Complex object containing the result of the operation.
div
public static final Complex div(Complex a,
double b)
- Computes the result of the division of the complex number a
by the real number b.
- Parameters:
- a - Complex The dividend
- b - double The divisor
- Returns:
- Complex The result of the operation
div
public static final Complex div(Complex a,
Complex b)
- Computes the result of the division of the complex number a
by the complex number b.
- Parameters:
- a - Complex The dividend
- b - Complex The divisor
- Returns:
- Complex The result of the operation
divAssign
public final Complex divAssign(double other)
- Computes the result of the division of this complex number
by a double precision number and store the result in this object.
- Parameters:
- other - double The divisor.
- Returns:
- Complex A reference to this Complex number, the result.
divAssign
public final Complex divAssign(Complex other)
- Computes the result of the division of this complex number
by another complex number and store the result in this object.
- Parameters:
- other - Complex The divisor.
- Returns:
- Complex A reference to this Complex number, the result.
equals
public final boolean equals(Complex other)
- Computes if two complex numbers have the same value.
- Parameters:
- other - Complex The Complex number to which this will be compared to.
- Returns:
- boolean The result of the comparison.
imag
public final double imag()
- Computes the imaginary part of this complex number
- Returns:
- double The imaginary part computed
imag
public static final double imag(Complex a)
- Computes the imaginary part of a given complex number
- Parameters:
- a - Complex The complex number to extract the imaginary part
- Returns:
- double The imaginary part computed
minus
public final Complex minus(double other)
- Computes the result of the subtraction of this Complex number by a
double.
- Parameters:
- other - double The amount to be subtracted
- Returns:
- Complex A new Complex object containing the result of the operation.
minus
public static final Complex minus(double a,
Complex b)
- Computes the result of a real number minus a complex number.
- Parameters:
- a - double The number being subtracted
- b - Complex The amount to be subtracted
- Returns:
- Complex The result of the operation.
minus
public final Complex minus(Complex other)
- Computes the result of this complex number minus a double.
- Parameters:
- other - Complex The amount to be subtracted
- Returns:
- Complex A new Complex object containing the result of the operation.
minus
public static final Complex minus(Complex a,
double b)
- Computes the result of a complex number minus a real.
- Parameters:
- a - Complex The number being subtracted
- b - double The amount to be subtracted
- Returns:
- Complex The result of the operation.
minus
public static final Complex minus(Complex a,
Complex b)
- Computes the result of a complex number a minus another complex number b.
- Parameters:
- a - Complex The number being subtracted
- b - Complex The amount to be subtracted
- Returns:
- Complex The result of the operation.
minusAssign
public final Complex minusAssign(double other)
- Computes the result of this complex number minus a real number
and store the result in this object.
- Parameters:
- other - double The amount subtracted.
- Returns:
- Complex A reference to this Complex number, the result.
minusAssign
public final Complex minusAssign(Complex other)
- Computes the result of this complex number minus another complex number
and store the result in this object.
- Parameters:
- other - Complex The amount subtracted.
- Returns:
- Complex A reference to this Complex number, the result.
phase
public final double phase()
- Computes the angle between the real axis and the vector
representing this complex number. This is the angle
of the complex number in polar cordinates.
- Returns:
- double The phase, angle values in Radians, value between -pi and pi.
phase
public static final double phase(Complex a)
- Computes the angle between the real axis and the vector
representing a complex number. This is the angle
of the complex number in polar cordinates.
- Parameters:
- a - Complex The Complex number whose angle in polar coordinates is computed.
- Returns:
- double The phase, angle values in Radians, value between -pi and pi.
plus
public final Complex plus(double other)
- Adds this complex number to a real number and
return the result in a new Complex object.
- Parameters:
- other - double The amount to be added
- Returns:
- Complex A new Complex object containing the result of the operation.
plus
public static final Complex plus(double a,
Complex b)
- Adds the value of two complex numbers.
- Parameters:
- a - double The first number being added.
- b - Complex The second number being added.
- Returns:
- Complex The result of the operation
plus
public final Complex plus(Complex b)
- Adds this Complex number to another Complex number and
return the result in a new Complex object.
- Parameters:
- other - Complex The amount to be added
- Returns:
- Complex A new Complex object containing the result of the operation.
plus
public static final Complex plus(Complex a,
double b)
- Adds the value of two numbers.
- Parameters:
- a - Complex The first number being added.
- b - double The second number being added.
- Returns:
- Complex The result of the operation
plus
public static final Complex plus(Complex a,
Complex b)
- Adds the value of two complex numbers.
- Parameters:
- a - Complex The first number being added.
- b - Complex The second number being added.
- Returns:
- Complex The result of the operation
plusAssign
public final Complex plusAssign(double other)
- Adds this complex number to a real number and
store the result in this object.
- Parameters:
- other - double The amount to be added
- Returns:
- Complex A reference to this Complex number, the result.
plusAssign
public final Complex plusAssign(Complex other)
- Adds this complex number to another complex number and
store the result in this object.
- Parameters:
- other - Complex The amount to be added
- Returns:
- Complex A reference to this Complex number, the result.
real
public final double real()
- Computes the real part of this complex number
- Returns:
- double The real part computed
real
public static final double real(Complex a)
- Computes the real part of a given complex number
- Parameters:
- a - Complex The complex number to extract the real part
- Returns:
- double The real part computed
sqrt
public final Complex sqrt()
- Computes the square root of the complex number.
- Returns:
- Complex The square root, a Complex.
sqrt
public static final Complex sqrt(Complex a)
- Computes the square root of a complex number.
- Parameters:
- a - Complex The source complex number.
- Returns:
- Complex The square root, a Complex.
times
public final Complex times(double other)
- Multiplies this complex number by a real number
and return the result in a new Complex object.
- Parameters:
- other - double The amount to multiply.
- Returns:
- Complex The new object containing the return value.
times
public static final Complex times(double a,
Complex b)
- Multiplies a complex and a real number.
- Parameters:
- a - double The first number being multiplied
- b - Complex The second number being multiplied
- Returns:
- Complex The result of the operation
times
public final Complex times(Complex other)
- Multiplies this complex number by another complex number
and return the result in a new Complex object.
- Parameters:
- other - Complex The amount to multiply.
- Returns:
- Complex The new object containing the return value.
times
public static final Complex times(Complex b,
double a)
- Multiplies a complex and a real number.
- Parameters:
- a - Complex The first number being multiplied
- b - double The second number being multiplied
- Returns:
- Complex The result of the operation
times
public static final Complex times(Complex a,
Complex b)
- Multiplies two complex numbers.
- Parameters:
- a - Complex The first number being multiplied
- b - Complex The second number being multiplied
- Returns:
- Complex The result of the operation
timesAssign
public final Complex timesAssign(double other)
- Multiplies this complex number by a real number
and store the result in this object.
- Parameters:
- other - double The amount to multiply.
- Returns:
- Complex A reference to this Complex number, the result.
timesAssign
public Complex timesAssign(Complex other)
- Multiplies this complex number by another complex number
and store the result in this object.
- Parameters:
- other - Complex The amount to multiply.
- Returns:
- Complex A reference to this Complex number, the result.
toString
public final String toString()
- Returns a string representation of the Complex object's value
- Returns:
- String The String object containing the string representation.
- Overrides:
- toString in class Object
unequals
public final boolean unequals(Complex other)
- Computes if two complex numbers have diferent values.
- Parameters:
- other - Complex The Complex number to which this will be compared to.
- Returns:
- boolean The result of the comparison.
All Packages Class Hierarchy This Package Previous Next Index