Package gnu.math
Class Complex
- java.lang.Object
-
- java.lang.Number
-
- gnu.math.Numeric
-
- gnu.math.Quantity
-
- gnu.math.Quaternion
-
- gnu.math.Complex
-
- All Implemented Interfaces:
Serializable
public abstract class Complex extends Quaternion
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Complex()
-
Method Summary
-
Methods inherited from class gnu.math.Quaternion
add, compare, divide, doubleImagValue, doubleJmagValue, doubleKmagValue, doubleRealValue, doubleValue, equals, jmMinusOne, jmOne, kmMinusOne, kmOne, longValue, make, make, neg, number, polar, polar, power, times
-
Methods inherited from class gnu.math.Quantity
add, compare, compareReversed, dimensions, divide, im, imValue, jmValue, kmValue, make, make, make, re, reValue, times, unit
-
Methods inherited from class gnu.math.Numeric
add, asNumericOrNull, div_inv, floatValue, geq, grt, intValue, mul_ident, power, sub, toString
-
Methods inherited from class java.lang.Number
byteValue, shortValue
-
-
-
-
Method Detail
-
jm
public final RealNum jm()
Description copied from class:Quantity
The value of the "j" component, as a RealNum. The unit() is not factored in, so you actually need to multiply by unit() to get the true "j" component.
-
km
public final RealNum km()
Description copied from class:Quantity
The value of the "k" component, as a RealNum. The unit() is not factored in, so you actually need to multiply by unit() to get the true "k" component.
-
complexPart
public final Complex complexPart()
- Overrides:
complexPart
in classQuaternion
-
vectorPart
public Quaternion vectorPart()
- Overrides:
vectorPart
in classQuaternion
-
unitVector
public Quaternion unitVector()
- Overrides:
unitVector
in classQuaternion
-
unitQuaternion
public Quaternion unitQuaternion()
- Overrides:
unitQuaternion
in classQuaternion
-
conjugate
public Quaternion conjugate()
- Overrides:
conjugate
in classQuaternion
-
isExact
public boolean isExact()
- Overrides:
isExact
in classQuaternion
-
classifyFinite
public int classifyFinite()
Check if value is finite, infinite, or NaN.- Overrides:
classifyFinite
in classQuaternion
- Returns:
- 1 if finite; 0 if infinite; -1 if NaN.
-
toExact
public Complex toExact()
- Overrides:
toExact
in classQuaternion
-
toInexact
public Complex toInexact()
- Overrides:
toInexact
in classQuaternion
-
imOne
public static CComplex imOne()
-
imMinusOne
public static CComplex imMinusOne()
-
make
public static Complex make(double re, double im)
-
polar
public static Complex polar(double r, double t)
-
abs
public Numeric abs()
- Overrides:
abs
in classQuaternion
-
angle
public RealNum angle()
- Overrides:
angle
in classQuaternion
-
colatitude
public final RealNum colatitude()
- Overrides:
colatitude
in classQuaternion
-
longitude
public final RealNum longitude()
- Overrides:
longitude
in classQuaternion
-
equals
public boolean equals(Object obj)
- Overrides:
equals
in classQuaternion
-
compare
public int compare(Object obj)
Description copied from class:Numeric
Return an integer for which ofthis
orobj
is larger. Return 1 ifthis>obj
; 0 ifthis==obj
; -1 ifthis<obj
; -2 ifthis!=obj
otherwise (for example if either is NaN); -3 if not comparable (incompatible types).- Overrides:
compare
in classQuaternion
-
isZero
public boolean isZero()
- Overrides:
isZero
in classQuaternion
-
toString
public String toString(int radix)
- Overrides:
toString
in classQuaternion
-
neg
public Numeric neg()
- Overrides:
neg
in classQuaternion
-
add
public Numeric add(Object y, int k)
Description copied from class:Numeric
Return this + k * obj.- Overrides:
add
in classQuaternion
-
addReversed
public Numeric addReversed(Numeric x, int k)
Description copied from class:Numeric
Calculatex+k&this
.- Overrides:
addReversed
in classQuaternion
-
mul
public Numeric mul(Object y)
- Overrides:
mul
in classQuaternion
-
mulReversed
public Numeric mulReversed(Numeric x)
- Overrides:
mulReversed
in classQuaternion
-
div
public Numeric div(Object y)
- Overrides:
div
in classQuaternion
-
divReversed
public Numeric divReversed(Numeric x)
- Overrides:
divReversed
in classQuaternion
-
exp
public Complex exp()
- Overrides:
exp
in classQuaternion
-
log
public Complex log()
- Overrides:
log
in classQuaternion
-
sqrt
public Complex sqrt()
- Overrides:
sqrt
in classQuaternion
-
sin
public Complex sin()
- Overrides:
sin
in classQuaternion
-
cos
public Complex cos()
- Overrides:
cos
in classQuaternion
-
tan
public Complex tan()
- Overrides:
tan
in classQuaternion
-
-