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:
java.io.Serializable
public abstract class Complex extends Quaternion
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Complex()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Numericabs()static Complexadd(Complex x, Complex y, int k)Numericadd(java.lang.Object y, int k)Return this + k * obj.NumericaddReversed(Numeric x, int k)Calculatex+k&this.RealNumangle()intclassifyFinite()Check if value is finite, infinite, or NaN.RealNumcolatitude()static intcompare(Complex x, Complex y)intcompare(java.lang.Object obj)Return an integer for which ofthisorobjis larger.ComplexcomplexPart()Quaternionconjugate()Complexcos()Numericdiv(java.lang.Object y)static Complexdivide(Complex x, Complex y)NumericdivReversed(Numeric x)static booleanequals(Complex x, Complex y)booleanequals(java.lang.Object obj)Complexexp()static CCompleximMinusOne()static CCompleximOne()booleanisExact()booleanisZero()RealNumjm()The value of the "j" component, as a RealNum.RealNumkm()The value of the "k" component, as a RealNum.Complexlog()RealNumlongitude()static Complexmake(double re, double im)static Complexmake(RealNum re, RealNum im)Numericmul(java.lang.Object y)NumericmulReversed(Numeric x)Numericneg()static Complexneg(Complex x)static Complexpolar(double r, double t)static Complexpolar(RealNum r, RealNum t)static Complexpower(Complex x, Complex y)Complexsin()Complexsqrt()Complextan()static Complextimes(Complex x, Complex y)ComplextoExact()ComplextoInexact()java.lang.StringtoString(int radix)QuaternionunitQuaternion()QuaternionunitVector()QuaternionvectorPart()-
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
-
-
-
-
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(java.lang.Object obj)
- Overrides:
equalsin classQuaternion
-
compare
public int compare(java.lang.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 java.lang.String toString(int radix)
- Overrides:
toStringin classQuaternion
-
neg
public Numeric neg()
- Overrides:
negin classQuaternion
-
add
public Numeric add(java.lang.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(java.lang.Object y)
- Overrides:
mulin classQuaternion
-
mulReversed
public Numeric mulReversed(Numeric x)
- Overrides:
mulReversedin classQuaternion
-
div
public Numeric div(java.lang.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
-
-