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
- See Also:
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabs()
static Complex
Return this + k * obj.addReversed
(Numeric x, int k) Calculatex+k&this
.angle()
int
Check if value is finite, infinite, or NaN.final RealNum
static int
int
Return an integer for which ofthis
orobj
is larger.final Complex
cos()
static Complex
static boolean
boolean
exp()
static CComplex
static CComplex
imOne()
boolean
isExact()
boolean
isZero()
final RealNum
jm()
The value of the "j" component, as a RealNum.final RealNum
km()
The value of the "k" component, as a RealNum.log()
final RealNum
static Complex
make
(double re, double im) static Complex
neg()
static Complex
static Complex
polar
(double r, double t) static Complex
static Complex
sin()
sqrt()
tan()
static Complex
toExact()
toString
(int radix) 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
-
Constructor Details
-
Complex
public Complex()
-
-
Method Details
-
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
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
- Overrides:
complexPart
in classQuaternion
-
vectorPart
- Overrides:
vectorPart
in classQuaternion
-
unitVector
- Overrides:
unitVector
in classQuaternion
-
unitQuaternion
- Overrides:
unitQuaternion
in classQuaternion
-
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
- Overrides:
toExact
in classQuaternion
-
toInexact
- Overrides:
toInexact
in classQuaternion
-
imOne
-
imMinusOne
-
make
-
make
-
polar
-
polar
-
power
-
abs
- Overrides:
abs
in classQuaternion
-
angle
- Overrides:
angle
in classQuaternion
-
colatitude
- Overrides:
colatitude
in classQuaternion
-
longitude
- Overrides:
longitude
in classQuaternion
-
equals
-
equals
- Overrides:
equals
in classQuaternion
-
compare
-
compare
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
- Overrides:
toString
in classQuaternion
-
neg
-
neg
- Overrides:
neg
in classQuaternion
-
add
-
add
Description copied from class:Numeric
Return this + k * obj.- Overrides:
add
in classQuaternion
-
addReversed
Description copied from class:Numeric
Calculatex+k&this
.- Overrides:
addReversed
in classQuaternion
-
times
-
mul
- Overrides:
mul
in classQuaternion
-
mulReversed
- Overrides:
mulReversed
in classQuaternion
-
divide
-
div
- Overrides:
div
in classQuaternion
-
divReversed
- Overrides:
divReversed
in classQuaternion
-
exp
- Overrides:
exp
in classQuaternion
-
log
- Overrides:
log
in classQuaternion
-
sqrt
- Overrides:
sqrt
in classQuaternion
-
sin
- Overrides:
sin
in classQuaternion
-
cos
- Overrides:
cos
in classQuaternion
-
tan
- Overrides:
tan
in classQuaternion
-