All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class JSci.maths.Complex

java.lang.Object
   |
   +----JSci.maths.Complex

public final class Complex
extends Object
implements FieldMember, Serializable
The Complex class encapsulates complex numbers.


Variable Index

 o I
The complex number 0+1i.
 o ONE
The complex number 1+0i.
 o ZERO
The complex number 0+0i.

Constructor Index

 o Complex(double, double)
Constructs the complex number x+iy.
 o Complex(String)
Constructs the complex number represented by a string.

Method Index

 o acos(Complex)
Returns the arc cosine of a complex number, in the range of (0.0 through pi, 0.0 through infinity).
 o acosh(Complex)
Returns the arc hyperbolic cosine of a complex number, in the range of (0.0 through infinity, 0.0 through pi).
 o add(AbelianGroupMember)
Returns the addition of this number and another.
 o add(Complex)
Returns the addition of this complex number and another.
 o addImag(double)
Returns the addition of this complex number with an imaginary part.
 o addReal(double)
Returns the addition of this complex number with a real part.
 o arg()
Returns the argument of this complex number.
 o asin(Complex)
Returns the arc sine of a complex number, in the range of (-pi/2 through pi/2, -infinity through infinity).
 o asinh(Complex)
Returns the arc hyperbolic sine of a complex number, in the range of (-infinity through infinity, -pi/2 through pi/2).
 o atan(Complex)
Returns the arc tangent of a complex number, in the range of (-pi/2 through pi/2, -infinity through infinity).
 o atanh(Complex)
Returns the arc hyperbolic tangent of a complex number, in the range of (-infinity through infinity, -pi/2 through pi/2).
 o conjugate()
Returns the complex conjugate of this complex number.
 o cos(Complex)
Returns the trigonometric cosine of a complex angle.
 o cosh(Complex)
Returns the hyperbolic cosine of a complex number.
 o divide(Complex)
Returns the division of this complex number by another.
 o divide(double)
Returns the division of this complex number by a scalar.
 o divide(FieldMember)
Returns the division of this number and another.
 o equals(Object)
Compares two complex numbers for equality.
 o exp(Complex)
Returns the exponential number e(2.718...) raised to the power of a complex number.
 o hashCode()
Returns a hashcode for this complex number.
 o imag()
Returns the imaginary part of this complex number.
 o inverse()
Returns the inverse of this complex number.
 o isInfinite()
Returns true if either the real or imaginary part is infinite.
 o isNaN()
Returns true if either the real or imaginary part is NaN.
 o log(Complex)
Returns the natural logarithm (base e) of a complex number.
 o mod()
Returns the modulus of this complex number.
 o multiply(Complex)
Returns the multiplication of this complex number and another.
 o multiply(double)
Returns the multiplication of this complex number by a scalar.
 o multiply(RingMember)
Returns the multiplication of this number and another.
 o negate()
Returns the negative of this complex number.
 o polar(double, double)
Creates a complex number with the given modulus and argument.
 o pow(Complex)
Returns this complex number raised to the power of another.
 o pow(double)
Returns this complex number raised to the power of a scalar.
 o real()
Returns the real part of this complex number.
 o sin(Complex)
Returns the trigonometric sine of a complex angle.
 o sinh(Complex)
Returns the hyperbolic sine of a complex number.
 o sqr()
Returns the square of this complex number.
 o sqrt()
Returns the square root of this complex number.
 o subtract(AbelianGroupMember)
Returns the subtraction of this number and another.
 o subtract(Complex)
Returns the subtraction of this complex number by another.
 o subtractImag(double)
Returns the subtraction of this complex number by an imaginary part.
 o subtractReal(double)
Returns the subtraction of this complex number by a real part.
 o tan(Complex)
Returns the trigonometric tangent of a complex angle.
 o tanh(Complex)
Returns the hyperbolic tangent of a complex number.
 o toString()
Returns a string representing the value of this complex number.

Variables

 o I
 public static final Complex I
The complex number 0+1i.

 o ONE
 public static final Complex ONE
The complex number 1+0i.

 o ZERO
 public static final Complex ZERO
The complex number 0+0i.

Constructors

 o Complex
 public Complex(double x,
                double y)
Constructs the complex number x+iy.

Parameters:
x - the real value of a complex number
y - the imaginary value of a complex number
 o Complex
 public Complex(String s) throws NumberFormatException
Constructs the complex number represented by a string.

Parameters:
s - a string representing a complex number
Throws: NumberFormatException
if the string does not contain a parsable number.

Methods

 o polar
 public static Complex polar(double mod,
                             double arg)
Creates a complex number with the given modulus and argument.

Parameters:
mod - the modulus of a complex number
arg - the argument of a complex number
 o equals
 public boolean equals(Object obj)
Compares two complex numbers for equality.

Parameters:
obj - a complex number
Overrides:
equals in class Object
 o toString
 public String toString()
Returns a string representing the value of this complex number.

Overrides:
toString in class Object
 o hashCode
 public int hashCode()
Returns a hashcode for this complex number.

Overrides:
hashCode in class Object
 o isNaN
 public boolean isNaN()
Returns true if either the real or imaginary part is NaN.

 o isInfinite
 public boolean isInfinite()
Returns true if either the real or imaginary part is infinite.

 o real
 public double real()
Returns the real part of this complex number.

 o imag
 public double imag()
Returns the imaginary part of this complex number.

 o mod
 public double mod()
Returns the modulus of this complex number.

 o arg
 public double arg()
Returns the argument of this complex number.

 o negate
 public AbelianGroupMember negate()
Returns the negative of this complex number.

 o inverse
 public FieldMember inverse()
Returns the inverse of this complex number.

 o conjugate
 public Complex conjugate()
Returns the complex conjugate of this complex number.

 o add
 public AbelianGroupMember add(AbelianGroupMember x)
Returns the addition of this number and another.

 o add
 public Complex add(Complex z)
Returns the addition of this complex number and another.

Parameters:
z - a complex number
 o addReal
 public Complex addReal(double real)
Returns the addition of this complex number with a real part.

Parameters:
real - a real part
 o addImag
 public Complex addImag(double imag)
Returns the addition of this complex number with an imaginary part.

Parameters:
imag - an imaginary part
 o subtract
 public AbelianGroupMember subtract(AbelianGroupMember x)
Returns the subtraction of this number and another.

 o subtract
 public Complex subtract(Complex z)
Returns the subtraction of this complex number by another.

Parameters:
z - a complex number
 o subtractReal
 public Complex subtractReal(double real)
Returns the subtraction of this complex number by a real part.

Parameters:
real - a real part
 o subtractImag
 public Complex subtractImag(double imag)
Returns the subtraction of this complex number by an imaginary part.

Parameters:
imag - an imaginary part
 o multiply
 public RingMember multiply(RingMember x)
Returns the multiplication of this number and another.

 o multiply
 public Complex multiply(Complex z)
Returns the multiplication of this complex number and another.

Parameters:
z - a complex number
 o multiply
 public Complex multiply(double x)
Returns the multiplication of this complex number by a scalar.

Parameters:
x - a real number
 o divide
 public FieldMember divide(FieldMember x)
Returns the division of this number and another.

 o divide
 public Complex divide(Complex z)
Returns the division of this complex number by another.

Parameters:
z - a complex number
Throws: ArithmeticException
If divide by zero.
 o divide
 public Complex divide(double x)
Returns the division of this complex number by a scalar.

Parameters:
x - a real number
Throws: ArithmeticException
If divide by zero.
 o pow
 public Complex pow(Complex z)
Returns this complex number raised to the power of another.

Parameters:
z - a complex number
 o pow
 public Complex pow(double x)
Returns this complex number raised to the power of a scalar.

Parameters:
x - a real number
 o sqr
 public Complex sqr()
Returns the square of this complex number.

 o sqrt
 public Complex sqrt()
Returns the square root of this complex number.

 o exp
 public static Complex exp(Complex z)
Returns the exponential number e(2.718...) raised to the power of a complex number.

Parameters:
z - a complex number
 o log
 public static Complex log(Complex z)
Returns the natural logarithm (base e) of a complex number.

Parameters:
z - a complex number
 o sin
 public static Complex sin(Complex z)
Returns the trigonometric sine of a complex angle.

Parameters:
z - an angle that is measured in radians
 o cos
 public static Complex cos(Complex z)
Returns the trigonometric cosine of a complex angle.

Parameters:
z - an angle that is measured in radians
 o tan
 public static Complex tan(Complex z)
Returns the trigonometric tangent of a complex angle.

Parameters:
z - an angle that is measured in radians
 o sinh
 public static Complex sinh(Complex z)
Returns the hyperbolic sine of a complex number.

Parameters:
z - a complex number
 o cosh
 public static Complex cosh(Complex z)
Returns the hyperbolic cosine of a complex number.

Parameters:
z - a complex number
 o tanh
 public static Complex tanh(Complex z)
Returns the hyperbolic tangent of a complex number.

Parameters:
z - a complex number
 o asin
 public static Complex asin(Complex z)
Returns the arc sine of a complex number, in the range of (-pi/2 through pi/2, -infinity through infinity).

Parameters:
z - a complex number
 o acos
 public static Complex acos(Complex z)
Returns the arc cosine of a complex number, in the range of (0.0 through pi, 0.0 through infinity).

Parameters:
z - a complex number
 o atan
 public static Complex atan(Complex z)
Returns the arc tangent of a complex number, in the range of (-pi/2 through pi/2, -infinity through infinity).

Parameters:
z - a complex number
 o asinh
 public static Complex asinh(Complex z)
Returns the arc hyperbolic sine of a complex number, in the range of (-infinity through infinity, -pi/2 through pi/2).

Parameters:
z - a complex number
 o acosh
 public static Complex acosh(Complex z)
Returns the arc hyperbolic cosine of a complex number, in the range of (0.0 through infinity, 0.0 through pi).

Parameters:
z - a complex number
 o atanh
 public static Complex atanh(Complex z)
Returns the arc hyperbolic tangent of a complex number, in the range of (-infinity through infinity, -pi/2 through pi/2).

Parameters:
z - a complex number

All Packages  Class Hierarchy  This Package  Previous  Next  Index