Package gnu.math
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
public class DComplex extends Complex implements Externalizable
A complex number using rectangular (Cartesian) plain double values.- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Numeric
add(Object y, int k)
Return this + k * obj.static Complex
cos(double x_re, double x_im)
static DComplex
div(double x_re, double x_im, double y_re, double y_im)
Numeric
div(Object y)
double
doubleImagValue()
The value of the imaginary component, as a double.double
doubleValue()
The value of the real component, as a double.boolean
equals(Object obj)
RealNum
im()
The value of the imaginary component, as a RealNum.boolean
isExact()
static Complex
log(double x_re, double x_im)
Numeric
mul(Object y)
Numeric
neg()
static Complex
power(double x_re, double x_im, double y_re, double y_im)
RealNum
re()
The value of the real component, as a RealNum.void
readExternal(ObjectInput in)
static Complex
sin(double x_re, double x_im)
static Complex
sqrt(double x_re, double x_im)
static Complex
tan(double x_re, double x_im)
Complex
toExact()
String
toString()
String
toString(int radix)
static Complex
unitQuaternion(double x_re, double x_im)
void
writeExternal(ObjectOutput out)
-
Methods inherited from class gnu.math.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, vectorPart
-
Methods inherited from class gnu.math.Quaternion
add, compare, divide, doubleJmagValue, doubleKmagValue, doubleRealValue, 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, imValue, jmValue, kmValue, make, make, make, reValue, times, unit
-
Methods inherited from class gnu.math.Numeric
add, asNumericOrNull, div_inv, floatValue, geq, grt, intValue, mul_ident, power, sub
-
Methods inherited from class java.lang.Number
byteValue, shortValue
-
-
-
-
Method Detail
-
re
public RealNum re()
Description copied from class:Quantity
The value of the real component, as a RealNum. The unit() is not factored in, so you actually need to multiply by unit() to get the true real component.
-
doubleValue
public double doubleValue()
Description copied from class:Quantity
The value of the real component, as a double. This is relative to the unit().dims - i.e. unit()/doubleValue() is factored in.- Overrides:
doubleValue
in classQuaternion
-
im
public RealNum im()
Description copied from class:Quantity
The value of the imaginary component, as a RealNum. The unit() is not factored in, so you actually need to multiply by unit() to get the true imaginary component.
-
doubleImagValue
public double doubleImagValue()
Description copied from class:Quantity
The value of the imaginary component, as a double. This is relative to the unit().dims - i.e. unit()/doubleValue() is factored in.- Overrides:
doubleImagValue
in classQuaternion
-
add
public Numeric add(Object y, int k)
Description copied from class:Numeric
Return this + k * obj.
-
power
public static Complex power(double x_re, double x_im, double y_re, double y_im)
-
log
public static Complex log(double x_re, double x_im)
-
div
public static DComplex div(double x_re, double x_im, double y_re, double y_im)
-
sqrt
public static Complex sqrt(double x_re, double x_im)
-
sin
public static Complex sin(double x_re, double x_im)
-
cos
public static Complex cos(double x_re, double x_im)
-
tan
public static Complex tan(double x_re, double x_im)
-
unitQuaternion
public static Complex unitQuaternion(double x_re, double x_im)
-
writeExternal
public void writeExternal(ObjectOutput out) throws IOException
- Specified by:
writeExternal
in interfaceExternalizable
- Throws:
IOException
-
readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
- Specified by:
readExternal
in interfaceExternalizable
- Throws:
IOException
ClassNotFoundException
-
-