Class PsyComplex

java.lang.Object
coneforest.psylla.core.PsyComplex
All Implemented Interfaces:
PsyAdditive<PsyNumeric>, PsyArithmetic<PsyNumeric>, PsyMultiplicative<PsyNumeric>, PsyNumeric, PsyObject, PsyValue

@Type("complex") public final class PsyComplex extends Object implements PsyNumeric
The representation of complex, a complex number.
  • Field Details

    • PSY_ARG

      @OperatorType("arg") public static final ContextAction PSY_ARG
      Context action of the arg operator.
    • PSY_COMPLEX

      @OperatorType("complex") public static final ContextAction PSY_COMPLEX
      Context action of the complex operator.
    • PSY_COMPLEXPOLAR

      @OperatorType("complexpolar") public static final ContextAction PSY_COMPLEXPOLAR
      Context action of the complexpolar operator.
    • PSY_CONJUGATE

      @OperatorType("conjugate") public static final ContextAction PSY_CONJUGATE
      Context action of the conjugate operator.
    • PSY_IMAGPART

      @OperatorType("imagpart") public static final ContextAction PSY_IMAGPART
      Context action of the imagpart operator.
    • PSY_REALPART

      @OperatorType("realpart") public static final ContextAction PSY_REALPART
      Context action of the realpart operator.
    • I

      public static final PsyComplex I
      Imaginary unit.
    • MINUS_I

      public static final PsyComplex MINUS_I
      Munus imaginary unit.
  • Constructor Details

    • PsyComplex

      public PsyComplex(double re, double im)
    • PsyComplex

      public PsyComplex(double re)
    • PsyComplex

      public PsyComplex(PsyRealNumeric oRealPart, PsyRealNumeric oImagPart)
    • PsyComplex

      public PsyComplex(PsyRealNumeric oNumeric)
  • Method Details

    • realValue

      public double realValue()
      Description copied from interface: PsyNumeric
      Returns the real part of this object.
      Specified by:
      realValue in interface PsyNumeric
      Returns:
      the real part of this object
    • imagValue

      public double imagValue()
      Description copied from interface: PsyNumeric
      Returns the imaginary part of this object.
      Specified by:
      imagValue in interface PsyNumeric
      Returns:
      the imaginary part of this object
    • isZero

      public boolean isZero()
      Specified by:
      isZero in interface PsyAdditive<PsyNumeric>
    • psyAbs

      public PsyReal psyAbs()
      Description copied from interface: PsyNumeric
      Returns the numeric absolute value of this object.
      Specified by:
      psyAbs in interface PsyNumeric
      Returns:
      the numeric absolute value of this object
    • psySignum

      public PsyComplex psySignum()
      Description copied from interface: PsyNumeric
      Returns the numeric signum of this object.
      Specified by:
      psySignum in interface PsyNumeric
      Returns:
      the numeric signum of this object
    • toSyntaxString

      public String toSyntaxString()
      Description copied from interface: PsyObject
      Returns the syntactic representation of this object.
      Specified by:
      toSyntaxString in interface PsyObject
      Returns:
      the syntactic representation of this object
    • psyRealPart

      public PsyReal psyRealPart()
      Returns a real real part of this object.
      Returns:
      a real real part of this object
    • psyImagPart

      public PsyReal psyImagPart()
      Returns a real imaginary part of this object.
      Returns:
      a real imaginary part of this object
    • psyArg

      public PsyReal psyArg()
      Returns a real representing the complex argument of this object. The argument belongs to the range (−π; π].
      Returns:
      a real representing the complex argument of this object
    • psyConjugate

      public PsyComplex psyConjugate()
      Returns a complex representing the complex conjugate of this object.
      Returns:
      a complex representing the complex conjugate of this object
    • psyNeg

      public PsyComplex psyNeg()
      Description copied from interface: PsyAdditive
      Returns the additive result of arithmetic negation of this object.
      Specified by:
      psyNeg in interface PsyAdditive<PsyNumeric>
      Returns:
      the additive result of arithmetic negation of this object
    • psyAdd

      public PsyComplex psyAdd(PsyNumeric oNumeric)
      Description copied from interface: PsyAdditive
      Returns the additive result of arithmetic addition of specified object to this object.
      Specified by:
      psyAdd in interface PsyAdditive<PsyNumeric>
      Parameters:
      oNumeric - the specified object.
      Returns:
      the additive result of arithmetic addition of specified object to this object
    • psySub

      public PsyComplex psySub(PsyNumeric oNumeric)
      Description copied from interface: PsyAdditive
      Returns the additive result of arithmetic subtraction of specified object from this object.
      Specified by:
      psySub in interface PsyAdditive<PsyNumeric>
      Parameters:
      oNumeric - the specified object.
      Returns:
      the additive result of arithmetic subtraction of specified object from this object
    • psyReciprocal

      public PsyComplex psyReciprocal()
      Description copied from interface: PsyMultiplicative
      Returns the multiplicative inverse of this object.
      Specified by:
      psyReciprocal in interface PsyMultiplicative<PsyNumeric>
      Returns:
      the multiplicative inverse of this object
    • psyMul

      public PsyComplex psyMul(PsyNumeric oNumeric)
      Description copied from interface: PsyMultiplicative
      Returns a result of arithmetic multiplication of this number by given object.
      Specified by:
      psyMul in interface PsyMultiplicative<PsyNumeric>
      Parameters:
      oNumeric - a given number.
      Returns:
      a result of arithmetic multiplication of this number by given object
    • psyDiv

      public PsyComplex psyDiv(PsyNumeric oNumeric)
      Description copied from interface: PsyMultiplicative
      Returns a result of arithmetic division of this object by given object.
      Specified by:
      psyDiv in interface PsyMultiplicative<PsyNumeric>
      Parameters:
      oNumeric - a given object.
      Returns:
      a result of arithmetic division of this object by given object
    • psyPow

      public PsyNumeric psyPow(PsyNumeric oNumeric)
      Specified by:
      psyPow in interface PsyNumeric
    • psyExp

      public PsyComplex psyExp()
      Description copied from interface: PsyNumeric
      Returns the numeric exponent of this object.
      Specified by:
      psyExp in interface PsyNumeric
      Returns:
      the numeric exponent of this object
    • psyCos

      public PsyComplex psyCos()
      Description copied from interface: PsyNumeric
      Returns the numeric cosine of this object.
      Specified by:
      psyCos in interface PsyNumeric
      Returns:
      the numeric cosine of this object
    • psySin

      public PsyComplex psySin()
      Description copied from interface: PsyNumeric
      Returns the numeric sine of this object.
      Specified by:
      psySin in interface PsyNumeric
      Returns:
      the numeric sine of this object
    • psyLog

      public PsyComplex psyLog()
      Description copied from interface: PsyNumeric
      Returns the numeric natural logarithm of this object.
      Specified by:
      psyLog in interface PsyNumeric
      Returns:
      the numeric natural logarithm of this object
    • psyAcos

      public PsyComplex psyAcos()
      Description copied from interface: PsyNumeric
      Returns the numeric arc cosine of this object.
      Specified by:
      psyAcos in interface PsyNumeric
      Returns:
      the numeric arc cosine of this object
    • psyAsin

      public PsyComplex psyAsin()
      Description copied from interface: PsyNumeric
      Returns the numeric arc sine of this object.
      Specified by:
      psyAsin in interface PsyNumeric
      Returns:
      the numeric arc sine of this object
    • psyAtan

      public PsyComplex psyAtan()
      Description copied from interface: PsyNumeric
      Returns the numeric arc tangent of this object.
      Specified by:
      psyAtan in interface PsyNumeric
      Returns:
      the numeric arc tangent of this object
    • psySqrt

      public PsyComplex psySqrt()
      Description copied from interface: PsyNumeric
      Returns the numeric square root of this object.
      Specified by:
      psySqrt in interface PsyNumeric
      Returns:
      the numeric square root of this object
    • psyCbrt

      public PsyComplex psyCbrt()
      Description copied from interface: PsyNumeric
      Returns the numeric cubic root of this object.
      Specified by:
      psyCbrt in interface PsyNumeric
      Returns:
      the numeric cubic root of this object
    • psyCosh

      public PsyComplex psyCosh()
      Description copied from interface: PsyNumeric
      Returns the numeric hyperbolic cosine of this object.
      Specified by:
      psyCosh in interface PsyNumeric
      Returns:
      the numeric hyperbolic cosine of this object
    • psyTan

      public PsyComplex psyTan()
      Description copied from interface: PsyNumeric
      Returns the numeric tangent of this object.
      Specified by:
      psyTan in interface PsyNumeric
      Returns:
      the numeric tangent of this object
    • psySinh

      public PsyComplex psySinh()
      Description copied from interface: PsyNumeric
      Returns the numeric hyperbolic sine of this object.
      Specified by:
      psySinh in interface PsyNumeric
      Returns:
      the numeric hyperbolic sine of this object
    • psyTanh

      public PsyComplex psyTanh()
      Description copied from interface: PsyNumeric
      Returns the numeric hyperbolic tangent of this object.
      Specified by:
      psyTanh in interface PsyNumeric
      Returns:
      the numeric hyperbolic tangent of this object
    • psyFromPolar

      public static PsyComplex psyFromPolar(PsyRealNumeric oAbs, PsyRealNumeric oArg)
    • fromPolar

      public static PsyComplex fromPolar(double abs, double arg)