gnu.math

Class Complex

Known Direct Subclasses:
CComplex, DComplex, RealNum

public abstract class Complex
extends Quantity

Field Summary

Fields inherited from class gnu.math.Numeric

CEILING, FLOOR, ROUND, TRUNCATE

Method Summary

Numeric
abs()
Numeric
add(Object y, int k)
Return this + k * obj.
static Complex
add(Complex x, Complex y, int k)
Numeric
addReversed(Numeric x, int k)
Calculate x+k&this.
RealNum
angle()
int
compare(Object obj)
Return 1 if this>obj; 0 if this==obj; -1 if this
static int
compare(Complex x, Complex y)
Numeric
div(Object y)
Numeric
divReversed(Numeric x)
static Complex
divide(Complex x, Complex y)
double
doubleImagValue()
double
doubleRealValue()
double
doubleValue()
boolean
equals(Object obj)
static boolean
equals(Complex x, Complex y)
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(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)
String
toString(int radix)

Methods inherited from class gnu.math.Quantity

abs, add, add, addReversed, compare, compare, compareReversed, dimensions, div, divReversed, divide, doubleImagValue, doubleValue, im, imValue, make, make, make, mul, mulReversed, neg, number, re, reValue, times, toString, unit

Methods inherited from class gnu.math.Numeric

abs, add, add, addReversed, compare, compareReversed, div, divReversed, div_inv, equals, floatValue, geq, grt, intValue, isExact, isZero, longValue, mul, mulReversed, mul_ident, neg, power, sub, toString, toString

Method Details

abs

public Numeric abs()
Overrides:
abs in interface Quantity

add

public Numeric add(Object y,
                   int k)
Return this + k * obj.
Overrides:
add in interface Quantity

add

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

addReversed

public Numeric addReversed(Numeric x,
                           int k)
Calculate x+k&this.
Overrides:
addReversed in interface Quantity

angle

public RealNum angle()

compare

public int compare(Object obj)
Return 1 if this>obj; 0 if this==obj; -1 if this
Overrides:
compare in interface Quantity

compare

public static int compare(Complex x,
                          Complex y)

div

public Numeric div(Object y)
Overrides:
div in interface Quantity

divReversed

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

divide

public static Complex divide(Complex x,
                             Complex y)

doubleImagValue

public double doubleImagValue()
Overrides:
doubleImagValue in interface Quantity

doubleRealValue

public final double doubleRealValue()

doubleValue

public double doubleValue()
Overrides:
doubleValue in interface Quantity

equals

public boolean equals(Object obj)
Overrides:
equals in interface Numeric

equals

public static boolean equals(Complex x,
                             Complex y)

exp

public Complex exp()

imMinusOne

public static CComplex imMinusOne()

imOne

public static CComplex imOne()

isExact

public boolean isExact()
Overrides:
isExact in interface Numeric

isZero

public boolean isZero()
Overrides:
isZero in interface Numeric

log

public Complex log()

longValue

public long longValue()
Overrides:
longValue in interface Numeric

make

public static Complex make(double re,
                           double im)

make

public static Complex make(RealNum re,
                           RealNum im)

mul

public Numeric mul(Object y)
Overrides:
mul in interface Quantity

mulReversed

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

neg

public Numeric neg()
Overrides:
neg in interface Quantity

neg

public static Complex neg(Complex x)

number

public Complex number()
Overrides:
number in interface Quantity

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)

sqrt

public Complex sqrt()

times

public static Complex times(Complex x,
                            Complex y)

toString

public String toString(int radix)
Overrides:
toString in interface Quantity