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:
Serializable
- Direct Known Subclasses:
ImmutableComplex
- Enclosing class:
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 constants
Complex.ONE
,
Complex.ZERO
and Complex.I
.
Hence I
cannot be changes but
I.neg()
can be changed.
Use ImmutableComplex
for a version where the results
of all operations cannot be changed.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.singularsys.jep.standard.Complex
Complex.NonPropagatingImmutableComplex
-
Field Summary
-
Constructor Summary
ConstructorDescriptionNonPropagatingImmutableComplex
(double x) NonPropagatingImmutableComplex
(double x, double y) -
Method Summary
Modifier and TypeMethodDescriptionpolarValueOf
(Number r, Number theta) final void
set
(double x, double y) Sets the real and imaginary values of the object.final void
Copies the values from the parameter object to this objectfinal void
setIm
(double y) Sets the imaginary component of the objectfinal void
setRe
(double x) Sets the real component of the objectMethods 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 Details
-
NonPropagatingImmutableComplex
public NonPropagatingImmutableComplex() -
NonPropagatingImmutableComplex
-
NonPropagatingImmutableComplex
public NonPropagatingImmutableComplex(double x, double y) -
NonPropagatingImmutableComplex
public NonPropagatingImmutableComplex(double x) -
NonPropagatingImmutableComplex
-
-
Method Details
-
set
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
-