gnu.math
Class Complex

java.lang.Object
  extended by java.lang.Number
      extended by gnu.math.Numeric
          extended by gnu.math.Quantity
              extended by gnu.math.Complex
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
CComplex, DComplex, RealNum

public abstract class Complex
extends Quantity

See Also:
Serialized Form

Field Summary
 
Fields inherited from class gnu.math.Numeric
CEILING, FLOOR, ROUND, TRUNCATE
 
Constructor Summary
Complex()
           
 
Method Summary
 Numeric abs()
           
static Complex add(Complex x, Complex y, int k)
           
 Numeric add(java.lang.Object y, int k)
          Return this + k * obj.
 Numeric addReversed(Numeric x, int k)
          Calculate x+k&this.
 RealNum angle()
           
static int compare(Complex x, Complex y)
           
 int compare(java.lang.Object obj)
          Return 1 if this>obj; 0 if this==obj; -1 if this
 Numeric div(java.lang.Object y)
           
static Complex divide(Complex x, Complex y)
           
 Numeric divReversed(Numeric x)
           
 double doubleImagValue()
          The value of the imaginary component, as a double.
 double doubleRealValue()
           
 double doubleValue()
          The value of the real component, as a double.
static boolean equals(Complex x, Complex y)
           
 boolean equals(java.lang.Object obj)
           
 Complex exp()
           
static CComplex imMinusOne()
           
static CComplex imOne()
           
 boolean isExact()
           
 boolean isZero()
           
 Complex log()
           
 long longValue()
           
static Complex make(double re, double im)
           
static Complex make(RealNum re, RealNum im)
           
 Numeric mul(java.lang.Object y)
           
 Numeric mulReversed(Numeric x)
           
 Numeric neg()
           
static Complex neg(Complex x)
           
 Complex number()
           
static DComplex polar(double r, double t)
           
static DComplex polar(RealNum r, RealNum t)
           
static Complex power(Complex x, Complex y)
           
 Complex sqrt()
           
static Complex times(Complex x, Complex y)
           
 java.lang.String toString(int radix)
           
 
Methods inherited from class gnu.math.Quantity
add, compare, compareReversed, dimensions, divide, im, imValue, make, make, make, re, reValue, times, unit
 
Methods inherited from class gnu.math.Numeric
add, div_inv, floatValue, geq, grt, intValue, mul_ident, power, sub, toString
 
Methods inherited from class java.lang.Number
byteValue, shortValue
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Complex

public Complex()
Method Detail

number

public Complex number()
Specified by:
number in class Quantity

isExact

public boolean isExact()
Specified by:
isExact in class Numeric

imOne

public static CComplex imOne()

imMinusOne

public static CComplex imMinusOne()

doubleValue

public double doubleValue()
Description copied from class: Quantity
The value of the real component, as a double. This is relative to the unit().dims - i.e. unit()/doubleValue() is factored in.

Overrides:
doubleValue in class Quantity

doubleImagValue

public double doubleImagValue()
Description copied from class: Quantity
The value of the imaginary component, as a double. This is relative to the unit().dims - i.e. unit()/doubleValue() is factored in.

Overrides:
doubleImagValue in class Quantity

doubleRealValue

public final double doubleRealValue()

longValue

public long longValue()
Overrides:
longValue in class Numeric

make

public static Complex make(RealNum re,
                           RealNum im)

make

public static Complex make(double re,
                           double im)

polar

public static DComplex polar(double r,
                             double t)

polar

public static DComplex polar(RealNum r,
                             RealNum t)

power

public static Complex power(Complex x,
                            Complex y)

abs

public Numeric abs()
Overrides:
abs in class Quantity

angle

public RealNum angle()

equals

public static boolean equals(Complex x,
                             Complex y)

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class Numeric

compare

public static int compare(Complex x,
                          Complex y)

compare

public int compare(java.lang.Object obj)
Description copied from class: Numeric
Return 1 if this>obj; 0 if this==obj; -1 if this
Overrides:
compare in class Quantity

isZero

public boolean isZero()
Specified by:
isZero in class Numeric

toString

public java.lang.String toString(int radix)
Overrides:
toString in class Quantity

neg

public static Complex neg(Complex x)

neg

public Numeric neg()
Overrides:
neg in class Quantity

add

public static Complex add(Complex x,
                          Complex y,
                          int k)

add

public Numeric add(java.lang.Object y,
                   int k)
Description copied from class: Numeric
Return this + k * obj.

Overrides:
add in class Quantity

addReversed

public Numeric addReversed(Numeric x,
                           int k)
Description copied from class: Numeric
Calculate x+k&this.

Overrides:
addReversed in class Quantity

times

public static Complex times(Complex x,
                            Complex y)

mul

public Numeric mul(java.lang.Object y)
Overrides:
mul in class Quantity

mulReversed

public Numeric mulReversed(Numeric x)
Overrides:
mulReversed in class Quantity

divide

public static Complex divide(Complex x,
                             Complex y)

div

public Numeric div(java.lang.Object y)
Overrides:
div in class Quantity

divReversed

public Numeric divReversed(Numeric x)
Overrides:
divReversed in class Quantity

exp

public Complex exp()

log

public Complex log()

sqrt

public Complex sqrt()