java.lang.Object
coneforest.psylla.core.PsyComplex
- All Implemented Interfaces:
PsyAdditive<PsyNumeric>,PsyArithmetic<PsyNumeric>,PsyAtomic,PsyMultiplicative<PsyNumeric>,PsyNumeric,PsyObject
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_TONAME, PSY_TOSTRING, PSY_TYPE -
Constructor Summary
ConstructorsConstructorDescriptionPsyComplex(double re) PsyComplex(double re, double im) PsyComplex(PsyRealNumeric oNumeric) PsyComplex(PsyRealNumeric oRealPart, PsyRealNumeric oImagPart) -
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns the real part of this object.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(double abs, double arg) static PsyComplexpsyFromPolar(PsyRealNumeric oAbs, PsyRealNumeric oArg) Returns arealimaginary part of this object.Returns abooleanindicating whether this object represents a zero value.psyLog()Returns thenumericnatural logarithm of this object.psyMul(PsyNumeric oNumeric) Returns a result of arithmetic multiplication of given object by this object.psyNeg()Returns theadditiveresult of arithmetic negation of this object.psyPow(PsyNumeric oNumeric) Returns arealreal part 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
psyNonZeroMethods inherited from interface coneforest.psylla.core.PsyObject
convert, execute, invoke, psyClone, psyEq, psyHashCode, psyInstanceOf, psyNe, psySyntax, psyToName, psyToString, psyType, typeName
-
Field Details
-
I
Imaginary unit. -
MINUS_I
Munus imaginary unit. -
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.
-
-
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.
-
imagValue
public double imagValue()Description copied from interface:PsyNumericReturns the real part of this object.- Specified by:
imagValuein interfacePsyNumeric- Returns:
- the imaginary part.
-
psyIsZero
Description copied from interface:PsyAdditiveReturns abooleanindicating whether this object represents a zero value.- Specified by:
psyIsZeroin interfacePsyAdditive<PsyNumeric>- Returns:
- a
booleanindicating whether this object represents a zero value.
-
psyAbs
Description copied from interface:PsyNumericReturns thenumericabsolute value of this object.- Specified by:
psyAbsin interfacePsyNumeric- Returns:
- the
numericabsolute value.
-
psySignum
Description copied from interface:PsyNumericReturns thenumericsignum of this object.- Specified by:
psySignumin interfacePsyNumeric- Returns:
- the
numericsignum.
-
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.
-
psyImagPart
Returns arealimaginary part of this object.- Returns:
- a
realimaginary part.
-
psyArg
Returns arealrepresenting the complex argument of this object. The argument belongs to the range (−π; π].- Returns:
- a
realargument.
-
psyConjugate
Returns acomplexrepresenting the complex conjugate of this object.- Returns:
- a
complexconjugate of this number.
-
psyNeg
Description copied from interface:PsyAdditiveReturns theadditiveresult of arithmetic negation of this object.- Specified by:
psyNegin interfacePsyAdditive<PsyNumeric>- Returns:
- the
additiveresult of arithmetic negation.
-
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 sum.
-
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:
- a difference.
-
psyReciprocal
- Specified by:
psyReciprocalin interfacePsyMultiplicative<PsyNumeric>
-
psyMul
Description copied from interface:PsyMultiplicativeReturns a result of arithmetic multiplication of given object by this object.- Specified by:
psyMulin interfacePsyMultiplicative<PsyNumeric>- Parameters:
oNumeric- a given object.- Returns:
- a product.
-
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 fraction.
-
psyPow
- Specified by:
psyPowin interfacePsyNumeric
-
psyExp
Description copied from interface:PsyNumericReturns thenumericexponent of this object.- Specified by:
psyExpin interfacePsyNumeric- Returns:
- the
numericexponent.
-
psyCos
Description copied from interface:PsyNumericReturns thenumericcosine of this object.- Specified by:
psyCosin interfacePsyNumeric- Returns:
- the
numericcosine.
-
psySin
Description copied from interface:PsyNumericReturns thenumericsine of this object.- Specified by:
psySinin interfacePsyNumeric- Returns:
- the
numericsine.
-
psyLog
Description copied from interface:PsyNumericReturns thenumericnatural logarithm of this object.- Specified by:
psyLogin interfacePsyNumeric- Returns:
- the
numericnatural logarithm.
-
psyAcos
Description copied from interface:PsyNumericReturns thenumericarc cosine of this object.- Specified by:
psyAcosin interfacePsyNumeric- Returns:
- the
numericarc cosine.
-
psyAsin
Description copied from interface:PsyNumericReturns thenumericarc sine of this object.- Specified by:
psyAsinin interfacePsyNumeric- Returns:
- the
numericarc sine.
-
psyAtan
Description copied from interface:PsyNumericReturns thenumericarc tangent of this object.- Specified by:
psyAtanin interfacePsyNumeric- Returns:
- the
numericarc tangent.
-
psySqrt
Description copied from interface:PsyNumericReturns thenumericsquare root of this object.- Specified by:
psySqrtin interfacePsyNumeric- Returns:
- the
numericsquare root.
-
psyCbrt
Description copied from interface:PsyNumericReturns thenumericcubic root of this object.- Specified by:
psyCbrtin interfacePsyNumeric- Returns:
- the
numericcubic root.
-
psyCosh
Description copied from interface:PsyNumericReturns thenumerichyperbolic cosine of this object.- Specified by:
psyCoshin interfacePsyNumeric- Returns:
- the
numerichyperbolic cosine.
-
psyTan
Description copied from interface:PsyNumericReturns thenumerictangent of this object.- Specified by:
psyTanin interfacePsyNumeric- Returns:
- the
numerictangent.
-
psySinh
Description copied from interface:PsyNumericReturns thenumerichyperbolic sine of this object.- Specified by:
psySinhin interfacePsyNumeric- Returns:
- the
numerichyperbolic sine.
-
psyTanh
Description copied from interface:PsyNumericReturns thenumerichyperbolic tangent of this object.- Specified by:
psyTanhin interfacePsyNumeric- Returns:
- the
numerichyperbolic tangent.
-
psyFromPolar
-
psyFromPolar
-