Class DComplex
java.lang.Object
java.lang.Number
gnu.math.Numeric
gnu.math.Quantity
gnu.math.Quaternion
gnu.math.Complex
gnu.math.DComplex
- All Implemented Interfaces:
Externalizable, Serializable
A complex number using rectangular (Cartesian) plain double values.
- See Also:
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturn this + k * obj.static Complexcos(double x_re, double x_im) static DComplexdiv(double x_re, double x_im, double y_re, double y_im) doubleThe value of the imaginary component, as a double.doubleThe value of the real component, as a double.booleanim()The value of the imaginary component, as a RealNum.booleanisExact()static Complexlog(double x_re, double x_im) final Numericneg()static Complexpower(double x_re, double x_im, double y_re, double y_im) re()The value of the real component, as a RealNum.voidstatic Complexsin(double x_re, double x_im) static Complexsqrt(double x_re, double x_im) static Complextan(double x_re, double x_im) toExact()toString()toString(int radix) static ComplexunitQuaternion(double x_re, double x_im) voidMethods inherited from class Complex
abs, add, addReversed, angle, classifyFinite, colatitude, compare, compare, complexPart, conjugate, cos, divide, divReversed, equals, exp, imMinusOne, imOne, isZero, jm, km, log, longitude, make, make, mulReversed, neg, polar, polar, power, sin, sqrt, tan, times, toInexact, unitQuaternion, unitVector, vectorPartMethods inherited from class Quaternion
add, compare, divide, doubleJmagValue, doubleKmagValue, doubleRealValue, equals, jmMinusOne, jmOne, kmMinusOne, kmOne, longValue, make, make, neg, number, polar, polar, power, timesMethods inherited from class Quantity
add, compare, compareReversed, dimensions, divide, imValue, jmValue, kmValue, make, make, make, reValue, times, unitMethods inherited from class Numeric
add, asNumericOrNull, div_inv, floatValue, geq, grt, intValue, mul_ident, power, subMethods inherited from class Number
byteValue, shortValue
-
Constructor Details
-
DComplex
public DComplex() -
DComplex
public DComplex(double real, double imag)
-
-
Method Details
-
re
-
doubleValue
public double doubleValue()Description copied from class:QuantityThe value of the real component, as a double. This is relative to the unit().dims - i.e. unit()/doubleValue() is factored in.- Overrides:
doubleValuein classQuaternion
-
im
-
doubleImagValue
public double doubleImagValue()Description copied from class:QuantityThe value of the imaginary component, as a double. This is relative to the unit().dims - i.e. unit()/doubleValue() is factored in.- Overrides:
doubleImagValuein classQuaternion
-
isExact
-
toExact
-
equals
-
toString
-
toString
-
neg
-
add
-
mul
-
div
-
power
-
log
-
div
-
sqrt
-
sin
-
cos
-
tan
-
unitQuaternion
-
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
readExternal
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-