Class PsyComplex

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

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

  • 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.
    • imagValue

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

      public PsyBoolean psyIsZero()
      Description copied from interface: PsyAdditive
      Returns a boolean indicating whether this object represents a zero value.
      Specified by:
      psyIsZero in interface PsyAdditive<PsyNumeric>
      Returns:
      a boolean indicating whether this object represents a zero value.
    • psyAbs

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

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

      public String toSyntaxString()
      Specified by:
      toSyntaxString in interface PsyObject
    • psyRealPart

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

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

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

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

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

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

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

      public PsyComplex psyReciprocal()
      Specified by:
      psyReciprocal in interface PsyMultiplicative<PsyNumeric>
    • psyMul

      public PsyComplex psyMul(PsyNumeric oNumeric)
      Description copied from interface: PsyMultiplicative
      Returns a result of arithmetic multiplication of given object by this object.
      Specified by:
      psyMul in interface PsyMultiplicative<PsyNumeric>
      Parameters:
      oNumeric - a given object.
      Returns:
      a product.
    • 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 fraction.
    • psyPow

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static PsyComplex psyFromPolar(double abs, double arg)