Class JSci.maths.Complex
All Packages Class Hierarchy This Package Previous Next Index
Class JSci.maths.Complex
java.lang.Object
|
+----java.lang.Number
|
+----JSci.maths.Complex
- public final class Complex
- extends Number
The Complex class provides an object for encapsulating complex numbers.
-
I
- The complex number 0+1i.
-
MINUS_I
- The complex number 0-1i.
-
MINUS_ONE
- The complex number -1+0i.
-
ONE
- The complex number 1+0i.
-
ZERO
- The complex number 0+0i.
-
Complex(double, double)
- Constructs the complex number x+yi.
-
arg()
- Returns the argument of this complex number.
-
byteValue()
- Maps the complex number to a real number using the scalar product.
-
clone()
- Creates a clone of this complex number.
-
doubleValue()
- Maps the complex number to a real number using the scalar product.
-
equals(Object)
- Compares two complex numbers for equality.
-
floatValue()
- Maps the complex number to a real number using the scalar product.
-
hashCode()
- Returns a hashcode for this complex number.
-
imag()
- Returns the imaginary part of this complex number.
-
intValue()
- Maps the complex number to a real number using the scalar product.
-
isInfinite()
- Returns true if either the real or imaginary part is infinite.
-
isNaN()
- Returns true if either the real or imaginary part is NaN.
-
longValue()
- Maps the complex number to a real number using the scalar product.
-
mod()
- Returns the modulus of this complex number.
-
polar(double, double)
- Creates a complex number with the given modulus and argument.
-
real()
- Returns the real part of this complex number.
-
shortValue()
- Maps the complex number to a real number using the scalar product.
-
toString()
- Returns a string representing the value of this complex number.
I
public final static Complex I
- The complex number 0+1i.
ONE
public final static Complex ONE
- The complex number 1+0i.
ZERO
public final static Complex ZERO
- The complex number 0+0i.
MINUS_ONE
public final static Complex MINUS_ONE
- The complex number -1+0i.
MINUS_I
public final static Complex MINUS_I
- The complex number 0-1i.
Complex
public Complex(double x,
double y)
- Constructs the complex number x+yi.
- Parameters:
- x - the real value of a complex number
- y - the imaginary value of a complex number
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
equals
public boolean equals(Object z)
- Compares two complex numbers for equality.
- Parameters:
- z - a complex number
- Overrides:
- equals in class Object
clone
public Object clone()
- Creates a clone of this complex number.
- Returns:
- a copy of this complex number.
- Overrides:
- clone in class Object
toString
public String toString()
- Returns a string representing the value of this complex number.
- Overrides:
- toString in class Object
hashCode
public int hashCode()
- Returns a hashcode for this complex number.
- Overrides:
- hashCode in class Object
byteValue
public byte byteValue()
- Maps the complex number to a real number using the scalar product.
shortValue
public short shortValue()
- Maps the complex number to a real number using the scalar product.
intValue
public int intValue()
- Maps the complex number to a real number using the scalar product.
- Overrides:
- intValue in class Number
longValue
public long longValue()
- Maps the complex number to a real number using the scalar product.
- Overrides:
- longValue in class Number
floatValue
public float floatValue()
- Maps the complex number to a real number using the scalar product.
- Overrides:
- floatValue in class Number
doubleValue
public double doubleValue()
- Maps the complex number to a real number using the scalar product.
- Overrides:
- doubleValue in class Number
isNaN
public boolean isNaN()
- Returns true if either the real or imaginary part is NaN.
isInfinite
public boolean isInfinite()
- Returns true if either the real or imaginary part is infinite.
real
public double real()
- Returns the real part of this complex number.
imag
public double imag()
- Returns the imaginary part of this complex number.
mod
public double mod()
- Returns the modulus of this complex number.
arg
public double arg()
- Returns the argument of this complex number.
All Packages Class Hierarchy This Package Previous Next Index