java.lang.Object
coneforest.psylla.core.PsyComplex
- All Implemented Interfaces:
PsyAdditive<PsyNumeric>,PsyArithmetic<PsyNumeric>,PsyMultiplicative<PsyNumeric>,PsyNumeric,PsyObject,PsyValue
The representation of
complex, a complex number.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final PsyComplexImaginary unit.static final PsyComplexMunus imaginary unit.static final ContextActionContext action of theargoperator.static final ContextActionContext action of thecomplexoperator.static final ContextActionContext action of thecomplexpolaroperator.static final ContextActionContext action of theconjugateoperator.static final ContextActionContext action of theimagpartoperator.static final ContextActionContext action of therealpartoperator.Fields inherited from interface coneforest.psylla.core.PsyAdditive
PSY_ADD, PSY_ISZERO, PSY_NEG, PSY_NONZERO, PSY_SUBFields inherited from interface coneforest.psylla.core.PsyMultiplicative
PSY_DIV, PSY_MUL, PSY_RECIPROCALFields inherited from interface coneforest.psylla.core.PsyNumeric
PSY_ABS, PSY_ACOS, PSY_ASIN, PSY_ATAN, PSY_CBRT, PSY_COS, PSY_COSH, PSY_EXP, PSY_LOG, PSY_POW, PSY_SIGNUM, PSY_SIN, PSY_SINH, PSY_SQRT, PSY_TAN, PSY_TANHFields inherited from interface coneforest.psylla.core.PsyObject
PSY_CLONE, PSY_EQ, PSY_HASHCODE, PSY_INSTANCEOF, PSY_NE, PSY_TOSTRING, PSY_TOSTRINGBUFFER, PSY_TYPE -
Constructor Summary
ConstructorsConstructorDescriptionPsyComplex(double re) PsyComplex(double re, double im) PsyComplex(PsyRealNumeric oNumeric) PsyComplex(PsyRealNumeric oRealPart, PsyRealNumeric oImagPart) -
Method Summary
Modifier and TypeMethodDescriptionstatic PsyComplexfromPolar(double abs, double arg) doubleReturns the imaginary part of this object.booleanisZero()psyAbs()Returns thenumericabsolute value of this object.psyAcos()Returns thenumericarc cosine of this object.psyAdd(PsyNumeric oNumeric) Returns theadditiveresult of arithmetic addition of specified object to this object.psyArg()Returns arealrepresenting the complex argument of this object.psyAsin()Returns thenumericarc sine of this object.psyAtan()Returns thenumericarc tangent of this object.psyCbrt()Returns thenumericcubic root of this object.Returns acomplexrepresenting the complex conjugate of this object.psyCos()Returns thenumericcosine of this object.psyCosh()Returns thenumerichyperbolic cosine of this object.psyDiv(PsyNumeric oNumeric) Returns a result of arithmetic division of this object by given object.psyExp()Returns thenumericexponent of this object.static PsyComplexpsyFromPolar(PsyRealNumeric oAbs, PsyRealNumeric oArg) Returns arealimaginary part of this object.psyLog()Returns thenumericnatural logarithm of this object.psyMul(PsyNumeric oNumeric) Returns a result of arithmetic multiplication of this number by given object.psyNeg()Returns theadditiveresult of arithmetic negation of this object.psyPow(PsyNumeric oNumeric) Returns arealreal part of this object.Returns the multiplicative inverse of this object.Returns thenumericsignum of this object.psySin()Returns thenumericsine of this object.psySinh()Returns thenumerichyperbolic sine of this object.psySqrt()Returns thenumericsquare root of this object.psySub(PsyNumeric oNumeric) Returns theadditiveresult of arithmetic subtraction of specified object from this object.psyTan()Returns thenumerictangent of this object.psyTanh()Returns thenumerichyperbolic tangent of this object.doubleReturns the real part of this object.Returns the syntactic representation of this object.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface coneforest.psylla.core.PsyAdditive
psyIsZero, psyNonZeroMethods inherited from interface coneforest.psylla.core.PsyObject
convert, execute, invoke, psyEq, psyHashCode, psyInstanceOf, psyNe, psySyntax, psyToString, psyToStringBuffer, psyType, typeName
-
Field Details
-
PSY_ARG
Context action of theargoperator. -
PSY_COMPLEX
Context action of thecomplexoperator. -
PSY_COMPLEXPOLAR
Context action of thecomplexpolaroperator. -
PSY_CONJUGATE
Context action of theconjugateoperator. -
PSY_IMAGPART
Context action of theimagpartoperator. -
PSY_REALPART
Context action of therealpartoperator. -
I
Imaginary unit. -
MINUS_I
Munus imaginary unit.
-
-
Constructor Details
-
PsyComplex
public PsyComplex(double re, double im) -
PsyComplex
public PsyComplex(double re) -
PsyComplex
-
PsyComplex
-
-
Method Details
-
realValue
public double realValue()Description copied from interface:PsyNumericReturns the real part of this object.- Specified by:
realValuein interfacePsyNumeric- Returns:
- the real part of this object
-
imagValue
public double imagValue()Description copied from interface:PsyNumericReturns the imaginary part of this object.- Specified by:
imagValuein interfacePsyNumeric- Returns:
- the imaginary part of this object
-
isZero
public boolean isZero()- Specified by:
isZeroin interfacePsyAdditive<PsyNumeric>
-
psyAbs
Description copied from interface:PsyNumericReturns thenumericabsolute value of this object.- Specified by:
psyAbsin interfacePsyNumeric- Returns:
- the
numericabsolute value of this object
-
psySignum
Description copied from interface:PsyNumericReturns thenumericsignum of this object.- Specified by:
psySignumin interfacePsyNumeric- Returns:
- the
numericsignum of this object
-
toSyntaxString
Description copied from interface:PsyObjectReturns the syntactic representation of this object.- Specified by:
toSyntaxStringin interfacePsyObject- Returns:
- the syntactic representation of this object
-
psyRealPart
Returns arealreal part of this object.- Returns:
- a
realreal part of this object
-
psyImagPart
Returns arealimaginary part of this object.- Returns:
- a
realimaginary part of this object
-
psyArg
Returns arealrepresenting the complex argument of this object. The argument belongs to the range (−π; π].- Returns:
- a
realrepresenting the complex argument of this object
-
psyConjugate
Returns acomplexrepresenting the complex conjugate of this object.- Returns:
- a
complexrepresenting the complex conjugate of this object
-
psyNeg
Description copied from interface:PsyAdditiveReturns theadditiveresult of arithmetic negation of this object.- Specified by:
psyNegin interfacePsyAdditive<PsyNumeric>- Returns:
- the
additiveresult of arithmetic negation of this object
-
psyAdd
Description copied from interface:PsyAdditiveReturns theadditiveresult of arithmetic addition of specified object to this object.- Specified by:
psyAddin interfacePsyAdditive<PsyNumeric>- Parameters:
oNumeric- the specified object.- Returns:
- the
additiveresult of arithmetic addition of specified object to this object
-
psySub
Description copied from interface:PsyAdditiveReturns theadditiveresult of arithmetic subtraction of specified object from this object.- Specified by:
psySubin interfacePsyAdditive<PsyNumeric>- Parameters:
oNumeric- the specified object.- Returns:
- the
additiveresult of arithmetic subtraction of specified object from this object
-
psyReciprocal
Description copied from interface:PsyMultiplicativeReturns the multiplicative inverse of this object.- Specified by:
psyReciprocalin interfacePsyMultiplicative<PsyNumeric>- Returns:
- the multiplicative inverse of this object
-
psyMul
Description copied from interface:PsyMultiplicativeReturns a result of arithmetic multiplication of this number by given object.- Specified by:
psyMulin interfacePsyMultiplicative<PsyNumeric>- Parameters:
oNumeric- a given number.- Returns:
- a result of arithmetic multiplication of this number by given object
-
psyDiv
Description copied from interface:PsyMultiplicativeReturns a result of arithmetic division of this object by given object.- Specified by:
psyDivin interfacePsyMultiplicative<PsyNumeric>- Parameters:
oNumeric- a given object.- Returns:
- a result of arithmetic division of this object by given object
-
psyPow
- Specified by:
psyPowin interfacePsyNumeric
-
psyExp
Description copied from interface:PsyNumericReturns thenumericexponent of this object.- Specified by:
psyExpin interfacePsyNumeric- Returns:
- the
numericexponent of this object
-
psyCos
Description copied from interface:PsyNumericReturns thenumericcosine of this object.- Specified by:
psyCosin interfacePsyNumeric- Returns:
- the
numericcosine of this object
-
psySin
Description copied from interface:PsyNumericReturns thenumericsine of this object.- Specified by:
psySinin interfacePsyNumeric- Returns:
- the
numericsine of this object
-
psyLog
Description copied from interface:PsyNumericReturns thenumericnatural logarithm of this object.- Specified by:
psyLogin interfacePsyNumeric- Returns:
- the
numericnatural logarithm of this object
-
psyAcos
Description copied from interface:PsyNumericReturns thenumericarc cosine of this object.- Specified by:
psyAcosin interfacePsyNumeric- Returns:
- the
numericarc cosine of this object
-
psyAsin
Description copied from interface:PsyNumericReturns thenumericarc sine of this object.- Specified by:
psyAsinin interfacePsyNumeric- Returns:
- the
numericarc sine of this object
-
psyAtan
Description copied from interface:PsyNumericReturns thenumericarc tangent of this object.- Specified by:
psyAtanin interfacePsyNumeric- Returns:
- the
numericarc tangent of this object
-
psySqrt
Description copied from interface:PsyNumericReturns thenumericsquare root of this object.- Specified by:
psySqrtin interfacePsyNumeric- Returns:
- the
numericsquare root of this object
-
psyCbrt
Description copied from interface:PsyNumericReturns thenumericcubic root of this object.- Specified by:
psyCbrtin interfacePsyNumeric- Returns:
- the
numericcubic root of this object
-
psyCosh
Description copied from interface:PsyNumericReturns thenumerichyperbolic cosine of this object.- Specified by:
psyCoshin interfacePsyNumeric- Returns:
- the
numerichyperbolic cosine of this object
-
psyTan
Description copied from interface:PsyNumericReturns thenumerictangent of this object.- Specified by:
psyTanin interfacePsyNumeric- Returns:
- the
numerictangent of this object
-
psySinh
Description copied from interface:PsyNumericReturns thenumerichyperbolic sine of this object.- Specified by:
psySinhin interfacePsyNumeric- Returns:
- the
numerichyperbolic sine of this object
-
psyTanh
Description copied from interface:PsyNumericReturns thenumerichyperbolic tangent of this object.- Specified by:
psyTanhin interfacePsyNumeric- Returns:
- the
numerichyperbolic tangent of this object
-
psyFromPolar
-
fromPolar
-