Package com.singularsys.jep.standard
Class Complex.NonPropagatingImmutableComplex
- java.lang.Object
-
- com.singularsys.jep.standard.Complex
-
- com.singularsys.jep.standard.Complex.NonPropagatingImmutableComplex
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
ImmutableComplex
- Enclosing class:
- Complex
public static class Complex.NonPropagatingImmutableComplex extends Complex
An immutable version of the Complex class. In this class the number cannot be changed, but numbers derived from it can be modified. This is largely done to not break existing code, and is used for the three constantsComplex.ONE
,Complex.ZERO
andComplex.I
. HenceI
cannot be changes butI.neg()
can be changed. UseImmutableComplex
for a version where the results of all operations cannot be changed.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.singularsys.jep.standard.Complex
Complex.NonPropagatingImmutableComplex
-
-
Constructor Summary
Constructors Constructor Description NonPropagatingImmutableComplex()
NonPropagatingImmutableComplex(double x)
NonPropagatingImmutableComplex(double x, double y)
NonPropagatingImmutableComplex(Complex z)
NonPropagatingImmutableComplex(java.lang.Number x)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Complex.NonPropagatingImmutableComplex
polarValueOf(java.lang.Number r, java.lang.Number theta)
void
set(double x, double y)
Sets the real and imaginary values of the object.void
set(Complex z)
Copies the values from the parameter object to this objectvoid
setIm(double y)
Sets the imaginary component of the objectvoid
setRe(double x)
Sets the real component of the object-
Methods inherited from class com.singularsys.jep.standard.Complex
abs, abs2, acos, acosh, add, arg, asin, asinh, atan, atanh, conj, cos, cosh, div, doubleValue, eq, equals, equals, fastPower, floatValue, hashCode, im, intValue, isInfinite, isNaN, log, longValue, mul, mul, neg, power, power, power, powerD, powerI, re, reciprocal, sin, sinh, sqrt, sub, tan, tanh, toString, toString, toString, toString
-
-
-
-
Constructor Detail
-
NonPropagatingImmutableComplex
public NonPropagatingImmutableComplex()
-
NonPropagatingImmutableComplex
public NonPropagatingImmutableComplex(Complex z)
-
NonPropagatingImmutableComplex
public NonPropagatingImmutableComplex(double x, double y)
-
NonPropagatingImmutableComplex
public NonPropagatingImmutableComplex(double x)
-
NonPropagatingImmutableComplex
public NonPropagatingImmutableComplex(java.lang.Number x)
-
-
Method Detail
-
set
public final void set(Complex z)
Description copied from class:Complex
Copies the values from the parameter object to this object
-
set
public final void set(double x, double y)
Description copied from class:Complex
Sets the real and imaginary values of the object.
-
setRe
public final void setRe(double x)
Description copied from class:Complex
Sets the real component of the object
-
setIm
public final void setIm(double y)
Description copied from class:Complex
Sets the imaginary component of the object
-
polarValueOf
public static Complex.NonPropagatingImmutableComplex polarValueOf(java.lang.Number r, java.lang.Number theta)
-
-