|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.jas.arith.BigComplex
public class BigComplex
BigComplex class based on BigRational implementing the Coefficient interface and with the familiar SAC method names.
Field Summary | |
---|---|
static BigComplex |
I
|
static BigComplex |
ONE
|
static BigComplex |
ZERO
constants: 1, 0 und i |
Constructor Summary | |
---|---|
BigComplex()
|
|
BigComplex(BigRational r)
|
|
BigComplex(BigRational r,
BigRational i)
The constructors create a BigComplex object from two BigRational objects real and imaginary part. |
|
BigComplex(int r)
|
|
BigComplex(java.lang.String s)
|
Method Summary | |
---|---|
Coefficient |
abs()
|
Coefficient |
add(Coefficient b)
arithmetic operations: +, -, - |
static BigRational |
CABS(BigComplex A)
Complex number absolute value. |
static BigComplex |
CCON(BigComplex A)
Complex number conjugate. |
static BigComplex |
CDIF(BigComplex A,
BigComplex B)
Complex number difference. |
static BigComplex |
CINV(BigComplex A)
Complex number inverse. |
static BigComplex |
CNEG(BigComplex A)
Complex number negative. |
int |
compareTo(java.lang.Object b)
since complex numbers are unordered, there is no compareTo method. |
BigComplex |
conjugate()
arithmetic operations: conjugate, absolut value |
static BigComplex |
CPROD(BigComplex A,
BigComplex B)
Complex number product. |
static BigComplex |
CQ(BigComplex A,
BigComplex B)
Complex number quotient. |
static BigComplex |
CRAND(int n)
Complex number, random. |
static BigComplex |
CSUM(BigComplex A,
BigComplex B)
Complex number sum. |
Coefficient |
divide(Coefficient b)
|
boolean |
equals(java.lang.Object b)
comparison of two BigComplex numbers |
Coefficient |
fromInteger(java.math.BigInteger a)
|
Coefficient |
fromInteger(long a)
|
BigRational |
getIm()
|
BigRational |
getRe()
get the real and imaginary part |
Coefficient |
inverse()
|
static boolean |
isCONE(BigComplex A)
Complex number one. |
static boolean |
isCZERO(BigComplex A)
Complex number zero. |
boolean |
isIMAG()
|
boolean |
isONE()
|
boolean |
isZERO()
|
Coefficient |
multiply(Coefficient b)
arithmetic operations: *, inverse, / |
Coefficient |
negate()
|
Coefficient |
random(int n)
random complex number |
int |
signum()
|
Coefficient |
subtract(Coefficient b)
|
java.lang.String |
toString()
string representation |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final BigComplex ZERO
public static final BigComplex ONE
public static final BigComplex I
Constructor Detail |
---|
public BigComplex(BigRational r, BigRational i)
public BigComplex(BigRational r)
public BigComplex(int r)
public BigComplex()
public BigComplex(java.lang.String s) throws java.lang.NumberFormatException
java.lang.NumberFormatException
Method Detail |
---|
public Coefficient fromInteger(java.math.BigInteger a)
fromInteger
in interface Coefficient
public Coefficient fromInteger(long a)
fromInteger
in interface Coefficient
public BigRational getRe()
public BigRational getIm()
public java.lang.String toString()
toString
in class java.lang.Object
public static boolean isCZERO(BigComplex A)
public boolean isZERO()
isZERO
in interface Coefficient
public static boolean isCONE(BigComplex A)
public boolean isONE()
isONE
in interface Coefficient
public boolean isIMAG()
public boolean equals(java.lang.Object b)
equals
in class java.lang.Object
public int compareTo(java.lang.Object b)
compareTo
in interface Coefficient
compareTo
in interface java.lang.Comparable
public int signum()
signum
in interface Coefficient
public Coefficient add(Coefficient b)
add
in interface Coefficient
public static BigComplex CSUM(BigComplex A, BigComplex B)
public static BigComplex CDIF(BigComplex A, BigComplex B)
public Coefficient subtract(Coefficient b)
subtract
in interface Coefficient
public static BigComplex CNEG(BigComplex A)
public Coefficient negate()
negate
in interface Coefficient
public static BigComplex CCON(BigComplex A)
public BigComplex conjugate()
public Coefficient abs()
abs
in interface Coefficient
public static BigRational CABS(BigComplex A)
public static BigComplex CPROD(BigComplex A, BigComplex B)
public Coefficient multiply(Coefficient b)
multiply
in interface Coefficient
public static BigComplex CINV(BigComplex A)
public Coefficient inverse()
inverse
in interface Coefficient
public static BigComplex CQ(BigComplex A, BigComplex B)
public Coefficient divide(Coefficient b)
divide
in interface Coefficient
public static BigComplex CRAND(int n)
public Coefficient random(int n)
random
in interface Coefficient
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |