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 an integer for which of {# code this} or {#code obj} is larger.
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 an integer for which of {# code this} or {#code obj} is larger. Return 1 if this>obj; 0 if this==obj; -1 if this; -2 if this!=obj otherwise (for example if either is NaN); -3 if not comparable (incompatible types).
Overrides:
compare in interface Quantity


div

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

divReversed

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



doubleRealValue

public final double doubleRealValue()











make

public static Complex make(double re,
                           double 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


number

public Complex number()
Overrides:
number in interface Quantity

polar

public static DComplex polar(double r,
                             double t)