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

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 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:
  • Constructor Details

    • NonPropagatingImmutableComplex

      public NonPropagatingImmutableComplex()
    • NonPropagatingImmutableComplex

      public NonPropagatingImmutableComplex(Complex z)
    • NonPropagatingImmutableComplex

      public NonPropagatingImmutableComplex(double x, double y)
    • NonPropagatingImmutableComplex

      public NonPropagatingImmutableComplex(double x)
    • NonPropagatingImmutableComplex

      public NonPropagatingImmutableComplex(Number x)
  • Method Details

    • set

      public final void set(Complex z)
      Description copied from class: Complex
      Copies the values from the parameter object to this object
      Overrides:
      set in class Complex
      Parameters:
      z - complex number to copy from
    • set

      public final void set(double x, double y)
      Description copied from class: Complex
      Sets the real and imaginary values of the object.
      Overrides:
      set in class Complex
      Parameters:
      x - real part
      y - imaginary part
    • setRe

      public final void setRe(double x)
      Description copied from class: Complex
      Sets the real component of the object
      Overrides:
      setRe in class Complex
      Parameters:
      x - real part
    • setIm

      public final void setIm(double y)
      Description copied from class: Complex
      Sets the imaginary component of the object
      Overrides:
      setIm in class Complex
      Parameters:
      y - imaginary part
    • polarValueOf

      public static Complex.NonPropagatingImmutableComplex polarValueOf(Number r, Number theta)