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.


Variable Index

 o im
The imaginary part of the complex number
 o re
The real part of the complex number

Constructor Index

 o Complex(Complex)
Copy constructor, builds a new complex object based on another Complex object's value.
 o Complex(double, double)
Construct a new Complex Object given it's real and imaginary parts.

Method Index

 o abs()
Computes the absolute value of this complex number.
 o abs(Complex)
Computes the absolute value of a complex number.
 o assign(Complex)
Assign the value of a complex number to this complex number.
 o conj()
Computes the conjugate of this complex number.
 o conj(Complex)
Computes the conjugate of a complex number.
 o div(Complex)
Computes the result of the division of this complex number by another complex number.
 o div(Complex, Complex)
Computes the result of the division of the complex number a by the complex number b.
 o div(Complex, double)
Computes the result of the division of the complex number a by the real number b.
 o div(double)
Computes the result of the division of this complex number by a double value.
 o div(double, Complex)
Computes the result of the division of the real number a by the complex number b.
 o divAssign(Complex)
Computes the result of the division of this complex number by another complex number and store the result in this object.
 o divAssign(double)
Computes the result of the division of this complex number by a double precision number and store the result in this object.
 o equals(Complex)
Computes if two complex numbers have the same value.
 o imag()
Computes the imaginary part of this complex number
 o imag(Complex)
Computes the imaginary part of a given complex number
 o minus(Complex)
Computes the result of this complex number minus a double.
 o minus(Complex, Complex)
Computes the result of a complex number a minus another complex number b.
 o minus(Complex, double)
Computes the result of a complex number minus a real.
 o minus(double)
Computes the result of the subtraction of this Complex number by a double.
 o minus(double, Complex)
Computes the result of a real number minus a complex number.
 o minusAssign(Complex)
Computes the result of this complex number minus another complex number and store the result in this object.
 o minusAssign(double)
Computes the result of this complex number minus a real number and store the result in this object.
 o phase()
Computes the angle between the real axis and the vector representing this complex number.
 o phase(Complex)
Computes the angle between the real axis and the vector representing a complex number.
 o plus(Complex)
Adds this Complex number to another Complex number and return the result in a new Complex object.
 o plus(Complex, Complex)
Adds the value of two complex numbers.
 o plus(Complex, double)
Adds the value of two numbers.
 o plus(double)
Adds this complex number to a real number and return the result in a new Complex object.
 o plus(double, Complex)
Adds the value of two complex numbers.
 o plusAssign(Complex)
Adds this complex number to another complex number and store the result in this object.
 o plusAssign(double)
Adds this complex number to a real number and store the result in this object.
 o real()
Computes the real part of this complex number
 o real(Complex)
Computes the real part of a given complex number
 o sqrt()
Computes the square root of the complex number.
 o sqrt(Complex)
Computes the square root of a complex number.
 o times(Complex)
Multiplies this complex number by another complex number and return the result in a new Complex object.
 o times(Complex, Complex)
Multiplies two complex numbers.
 o times(Complex, double)
Multiplies a complex and a real number.
 o times(double)
Multiplies this complex number by a real number and return the result in a new Complex object.
 o times(double, Complex)
Multiplies a complex and a real number.
 o timesAssign(Complex)
Multiplies this complex number by another complex number and store the result in this object.
 o timesAssign(double)
Multiplies this complex number by a real number and store the result in this object.
 o toString()
Returns a string representation of the Complex object's value
 o unequals(Complex)
Computes if two complex numbers have diferent values.

Variables

 o re
 public double re
The real part of the complex number

 o im
 public double im
The imaginary part of the complex number

Constructors

 o 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
 o 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.

Methods

 o abs
 public final double abs()
Computes the absolute value of this complex number.

Returns:
double The absolute value.
 o 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
 o 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.
 o conj
 public final Complex conj()
Computes the conjugate of this complex number.

Returns:
Complex The conjugate Complex
 o 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
 o 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.
 o 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
 o 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.
 o 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
 o 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
 o 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.
 o 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.
 o 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.
 o imag
 public final double imag()
Computes the imaginary part of this complex number

Returns:
double The imaginary part computed
 o 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
 o 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.
 o 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.
 o 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.
 o 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.
 o 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.
 o 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.
 o 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.
 o 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.
 o 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.
 o 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.
 o 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
 o 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.
 o 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
 o 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
 o 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.
 o 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.
 o real
 public final double real()
Computes the real part of this complex number

Returns:
double The real part computed
 o 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
 o sqrt
 public final Complex sqrt()
Computes the square root of the complex number.

Returns:
Complex The square root, a Complex.
 o 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.
 o 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.
 o 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
 o 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.
 o 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
 o 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
 o 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.
 o 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.
 o 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
 o 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