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:QuantityThe 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:QuantityThe 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:
complexPartin classQuaternion
-
vectorPart
public Quaternion vectorPart()
- Overrides:
vectorPartin classQuaternion
-
unitVector
public Quaternion unitVector()
- Overrides:
unitVectorin classQuaternion
-
unitQuaternion
public Quaternion unitQuaternion()
- Overrides:
unitQuaternionin classQuaternion
-
conjugate
public Quaternion conjugate()
- Overrides:
conjugatein classQuaternion
-
isExact
public boolean isExact()
- Overrides:
isExactin classQuaternion
-
classifyFinite
public int classifyFinite()
Check if value is finite, infinite, or NaN.- Overrides:
classifyFinitein classQuaternion- Returns:
- 1 if finite; 0 if infinite; -1 if NaN.
-
toExact
public Complex toExact()
- Overrides:
toExactin classQuaternion
-
toInexact
public Complex toInexact()
- Overrides:
toInexactin 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:
absin classQuaternion
-
angle
public RealNum angle()
- Overrides:
anglein classQuaternion
-
colatitude
public final RealNum colatitude()
- Overrides:
colatitudein classQuaternion
-
longitude
public final RealNum longitude()
- Overrides:
longitudein classQuaternion
-
equals
public boolean equals(Object obj)
- Overrides:
equalsin classQuaternion
-
compare
public int compare(Object obj)
Description copied from class:NumericReturn an integer for which ofthisorobjis larger. Return 1 ifthis>obj; 0 ifthis==obj; -1 ifthis<obj; -2 ifthis!=objotherwise (for example if either is NaN); -3 if not comparable (incompatible types).- Overrides:
comparein classQuaternion
-
isZero
public boolean isZero()
- Overrides:
isZeroin classQuaternion
-
toString
public String toString(int radix)
- Overrides:
toStringin classQuaternion
-
neg
public Numeric neg()
- Overrides:
negin classQuaternion
-
add
public Numeric add(Object y, int k)
Description copied from class:NumericReturn this + k * obj.- Overrides:
addin classQuaternion
-
addReversed
public Numeric addReversed(Numeric x, int k)
Description copied from class:NumericCalculatex+k&this.- Overrides:
addReversedin classQuaternion
-
mul
public Numeric mul(Object y)
- Overrides:
mulin classQuaternion
-
mulReversed
public Numeric mulReversed(Numeric x)
- Overrides:
mulReversedin classQuaternion
-
div
public Numeric div(Object y)
- Overrides:
divin classQuaternion
-
divReversed
public Numeric divReversed(Numeric x)
- Overrides:
divReversedin classQuaternion
-
exp
public Complex exp()
- Overrides:
expin classQuaternion
-
log
public Complex log()
- Overrides:
login classQuaternion
-
sqrt
public Complex sqrt()
- Overrides:
sqrtin classQuaternion
-
sin
public Complex sin()
- Overrides:
sinin classQuaternion
-
cos
public Complex cos()
- Overrides:
cosin classQuaternion
-
tan
public Complex tan()
- Overrides:
tanin classQuaternion
-
-